/* WISEintelligence Custom Styles */
/* Ported from WISEAlliance.Api - Visual mockup styles */

body {
  margin: 0;
  font-family: var(--font-family-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   WISE BRAND COLORS
   ======================================== */

:root {
  --wise-primary: #25507C;
  --wise-primary-hover: #1E4368;
  --wise-primary-dark: #163450;
  --wise-dark: #1A102C;
  --wise-gray-50: #F9F8F3;
  --wise-gray-100: #F4F2EA;
  --wise-gray-200: #E0DBE7;
}

/* ========================================
   BLAZOR ERROR UI
   ======================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ========================================
   LOADING PROGRESS
   ======================================== */

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #25507C;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* ========================================
   FLOATING INPUT STYLES
   For attestation sections (expanded rows)
   ======================================== */

.attestation-section .floating-input-wrapper {
    position: relative;
    min-width: 0;
    min-height: 54px;
}

.attestation-section .floating-input-wrapper .floating-input {
    font-size: 16px;
    padding: 24px 16px 8px;
    min-height: 54px;
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.attestation-section .floating-input-wrapper .floating-input:focus {
    outline: none;
    border-color: #25507c;
    box-shadow: 0 0 0 2px rgba(37, 80, 124, 0.2);
}

.attestation-section .floating-input-wrapper .floating-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.2s ease;
    background: #ffffff;
    padding: 0 4px;
}

/* Label floats up when input is focused or has value */
.attestation-section .floating-input-wrapper .floating-input:focus + .floating-label,
.attestation-section .floating-input-wrapper .floating-input:not(:placeholder-shown) + .floating-label,
.attestation-section .floating-input-wrapper .floating-input.has-value + .floating-label {
    top: -10px;
    transform: none;
    font-size: 12px;
    font-weight: 500;
    color: #1e4368;
}

/* Number input: extra right padding for spinner */
.attestation-section .floating-input-wrapper .floating-input[type="number"] {
    padding-right: 32px;
}

/* Missing field (red border and label) */
.attestation-section .manual-field-missing .floating-input {
    border-color: #dc2626 !important;
    background-color: #ffffff !important;
}

.attestation-section .manual-field-missing .floating-label {
    color: #dc2626 !important;
}

.attestation-section .manual-field-missing .floating-input:focus + .floating-label,
.attestation-section .manual-field-missing .floating-input.has-value + .floating-label,
.attestation-section .manual-field-missing .floating-input:not(:placeholder-shown) + .floating-label {
    color: #dc2626 !important;
}

.attestation-section .manual-field-missing .floating-input:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Read-only floating inputs (for view mode) */
.attestation-section .floating-input-wrapper .floating-input[readonly] {
    background-color: #f9fafb;
    cursor: default;
}

.attestation-section .manual-field-missing .floating-input[readonly] {
    /*background-color: #fef2f2 !important;*/
}

/* For missing fields (empty readonly inputs), always float the label up */
.attestation-section .manual-field-missing .floating-input[readonly] + .floating-label {
    top: -10px;
    transform: none;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
}

/* Edit mode: always float labels for editable inputs */
.attestation-section .floating-input-wrapper .floating-input:not([readonly]) + .floating-label {
    top: -10px;
    transform: none;
    font-size: 12px;
    font-weight: 500;
    color: #1e4368;
}

/* Edit mode: red label for missing fields */
.attestation-section .manual-field-missing .floating-input:not([readonly]) + .floating-label {
    color: #dc2626;
}
