/* wwwroot/css/app.css — global base styles */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.hidden {
    display: none;
}
.overlay {
    position: absolute;
    top: 20%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    color: white;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
html, body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 25px;
}

.field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #5a607a;
}

.field .required { color: #d4891a; }
.field .hint     { color: #9298b0; font-weight: 400; font-size: 11px; }

.field input,
.field select,
.field textarea {
    height: 44px;
    border-radius: 8px;
    border: 1.5px solid #e2ddd6;
    padding: 0 14px;
    font-size: 14px;
    color: #1b2240;
    background: #fff;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #1b2d52;
}

.field input.input-error,
.field select.input-error {
    border-color: #e85454;
}

.field .field-hint {
    font-size: 11px;
    color: #9298b0;
}

.input-mono { font-family: 'DM Mono', monospace; letter-spacing: 0.04em; }

/* Input with prefix/suffix */
.input-with-prefix,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-prefix .prefix {
    position: absolute;
    left: 13px;
    color: #9298b0;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.input-with-prefix input { padding-left: 26px; }

.input-with-suffix .suffix {
    position: absolute;
    right: 13px;
    color: #9298b0;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}

.input-with-suffix input { padding-right: 42px; }

/* Grid helpers */
.form-row {
    display: grid;
    gap: 14px;
}
.form-row.two-col  { grid-template-columns: 1fr 1fr; }
.form-row.three-col{ grid-template-columns: auto 1fr 1fr; }
.form-row.address-row {
    grid-template-columns: 2fr 1.5fr 0.8fr;
}
    .form-row.ymm-row {
        grid-template-columns: 0.8fr 1.5fr 2fr;
    }
/* ── VALIDATION MESSAGES ────────────────────────────────────── */
.validation-message {
    font-size: 11px;
    color: #e85454;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* ── RADIO CARDS ────────────────────────────────────────────── */
.radio-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e2ddd6;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.radio-card:hover    { border-color: #9298b0; }
.radio-card.selected { border-color: #1b2d52; background: rgba(27,45,82,0.03); }

.radio-dot {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid #e2ddd6;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.radio-card.selected .radio-dot { border-color: #1b2d52; }

.radio-dot-inner {
    width: 10px; height: 10px; border-radius: 50%;
    background: #1b2d52;
}

.radio-icon  { font-size: 20px; }
.radio-label { font-weight: 600; font-size: 13.5px; color: #1b2240; }
.radio-sub   { font-size: 12px; color: #9298b0; margin-top: 2px; }

/* ── STEP CONTENT ───────────────────────────────────────────── */
.step-content { display: flex; flex-direction: column; gap: 20px; }

.step-header { margin-bottom: 4px; }
.step-header .step-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.step-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 24px; color: #1b2240;
    letter-spacing: -0.02em; line-height: 1.2;
}
.step-header p { font-size: 14px; color: #9298b0; margin-top: 5px; }

/* ── SAVINGS PREVIEW ────────────────────────────────────────── */
.savings-preview {
    background: linear-gradient(135deg, #1b2d52 0%, #243566 100%);
    border-radius: 12px; padding: 18px 20px;
    color: #fff; display: flex; gap: 24px; align-items: center;
}
.savings-label  { font-size: 12px; opacity: 0.55; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.savings-amount { font-family: 'DM Serif Display', serif; font-size: 32px; color: #f0a42a; margin-top: 4px; line-height: 1; }
.savings-amount span { font-size: 16px; }
.savings-sub    { font-size: 12px; opacity: 0.55; margin-top: 4px; }
.savings-divider { width: 1px; background: rgba(255,255,255,0.15); align-self: stretch; }
.savings-preview-right { text-align: right; }
.savings-sub-label { font-size: 11px; opacity: 0.5; }
.savings-new-pay { font-size: 20px; font-weight: 700; }
.savings-new-pay span { font-size: 13px; opacity: 0.6; }

/* ── SECURITY BANNER ────────────────────────────────────────── */
.security-banner {
    background: #e8f9f2; border: 1px solid #2ab87a;
    border-radius: 10px; padding: 11px 14px;
    font-size: 12.5px; color: #5a607a; display: flex; gap: 8px; align-items: center;
}

/* ── TIP BANNER ─────────────────────────────────────────────── */
.tip-banner {
    background: #fdf3dd; border-radius: 10px;
    padding: 12px 16px; display: flex; gap: 10px; align-items: flex-start;
    font-size: 12.5px; color: #d4891a; line-height: 1.5;
}

/* ── CONSENT CHECKBOXES ─────────────────────────────────────── */
.consent-info-card { background: #fff; border: 1px solid #e2ddd6; border-radius: 12px; overflow: hidden; }
.consent-info-header { background: #1b2d52; padding: 16px 20px; color: #fff; }
.consent-info-header h3 { font-family: 'DM Sans', serif; font-size: 18px; }
.consent-info-header p  { font-size: 12px; opacity: 0.55; margin-top: 3px; }
.consent-info-body  { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.consent-info-item  { display: flex; gap: 12px; align-items: flex-start; }
.consent-info-item span { font-size: 18px; flex-shrink: 0; }
.consent-info-item strong { font-size: 13.5px; display: block; }
.consent-info-item p { font-size: 12.5px; color: #9298b0; margin-top: 2px; }

.consent-checkboxes { display: flex; flex-direction: column; gap: 10px; }

.consent-row {
    display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
    padding: 12px 14px; border: 1.5px solid #e2ddd6; border-radius: 10px;
    background: #fff; font-size: 13px; color: #5a607a; line-height: 1.5;
    transition: border-color 0.15s, background 0.15s;
}
.consent-row.checked { border-color: #1b2d52; background: rgba(27,45,82,0.03); }

.checkbox {
    width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; margin-top: 1px;
    border: 2px solid #e2ddd6; background: transparent;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: #fff; transition: all 0.15s;
}
.checkbox.checked { background: #1b2d52; border-color: #1b2d52; }

/* ── REVIEW SECTION ─────────────────────────────────────────── */
.review-section { background: #f6f4f0; border: 1px solid #e2ddd6; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.review-section-header {
    padding: 10px 16px; background: #fff;
    border-bottom: 1px solid #e2ddd6;
    font-weight: 700; font-size: 13px;
    display: flex; gap: 8px; align-items: center;
}
.review-row { display: flex; padding: 8px 16px; border-bottom: 1px solid #e2ddd6; }
.review-row:last-child { border-bottom: none; }
.review-row-label { width: 160px; color: #9298b0; font-size: 13px; flex-shrink: 0; }
.review-row-value { font-size: 13px; font-weight: 500; color: #1b2240; }

.submit-banner {
    background: linear-gradient(135deg, #1b2d52, #243566);
    border-radius: 12px; padding: 18px 20px;
    color: #fff; text-align: center; margin-top: 8px;
}
.submit-banner h3 { font-family: 'DM Serif Display', serif; font-size: 20px; margin-bottom: 6px; }
.submit-banner p  { font-size: 13px; opacity: 0.6; }

/* ── WIZARD SHELL ───────────────────────────────────────────── */
.wizard-shell { min-height: 100vh; background: #f6f4f0; display: flex; flex-direction: column; }

.wizard-header {
    background: #1b2d52;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.wizard-logo { display: flex; align-items: center; gap: 10px; }
.wizard-logo-icon {
    width: 30px; height: 30px; border-radius: 7px; background: #f0a42a;
}
.wizard-logo span { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.wizard-header-title { color: rgba(255,255,255,0.85); font-size: 25px; }
.wizard-step-counter { color: rgba(255,255,255,0.35); font-size: 12px; }

.wizard-progress-track { height: 3px; background: rgba(0,0,0,0.08); }
.wizard-progress-fill { height: 100%; background: #f0a42a; transition: width 0.4s ease; }

.wizard-stepper {
    display: flex; align-items: center; justify-content: center;
    padding: 28px 20px 0; gap: 0;
}
.stepper-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 64px; }
.stepper-circle {
    width: 36px; height: 36px; border-radius: 18px;
    border: 2px solid #e2ddd6;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; transition: all 0.2s;
}
.stepper-item.done   .stepper-circle { background: #1b2d52; border-color: #1b2d52; color: #fff; }
.stepper-item.active .stepper-circle { border-color: #1b2d52; color: #1b2d52; }
.stepper-label { font-size: 11px; font-weight: 400; color: #9298b0; white-space: nowrap; }
.stepper-item.active .stepper-label { color: #1b2d52; font-weight: 700; }
.stepper-item.done   .stepper-label { color: #5a607a; font-weight: 600; }
.stepper-line { flex: 1; height: 2px; background: #e2ddd6; margin-bottom: 20px; min-width: 20px; max-width: 60px; transition: background 0.3s; }
.stepper-line.done { background: #1b2d52; }

.wizard-body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 28px 20px 60px; }
.wizard-card { width: 100%; max-width: 640px; background: #fff; border-radius: 16px; border: 1px solid #e2ddd6; box-shadow: 0 2px 20px rgba(0,0,0,0.06); overflow: hidden; }
.wizard-card > .step-content { padding: 32px 36px; }

.wizard-footer {
    padding: 14px 36px 22px;
    border-top: 1px solid #e2ddd6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f6f4f0;
    flex-wrap: wrap;
}
.wizard-footer-right { display: flex; align-items: center; gap: 10px; }
.step-counter-small  { font-size: 12px; color: #9298b0; }

.btn-back {
    padding: 10px 22px; border-radius: 9px; border: 1.5px solid #e2ddd6;
    background: #fff; color: #5a607a; font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-back:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-next {
    padding: 10px 28px; border-radius: 9px; border: none;
    background: #1b2d52; color: #fff; font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: opacity 0.15s;
}
.btn-next:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .form-row.two-col,
    .form-row.three-col,
    .form-row.address-row { grid-template-columns: 1fr; }
    .radio-card-grid { grid-template-columns: 1fr; }
    .wizard-stepper { display: none; }
    .wizard-card > .step-content { padding: 24px 20px; }
    .wizard-footer { padding: 14px 20px 20px; }

    .field {
        margin-bottom: 5px !important;
    }
}

/* ── REQUEST TYPE CARDS ─────────────────────────────────────── */
.request-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.request-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px 16px;
    border-radius: 12px;
    cursor: pointer;
    border: 2.5px solid #e2ddd6;
    background: #fff;
    transition: all 0.15s;
}

.request-type-card:hover  { border-color: #9298b0; }
.request-type-card.selected {
    border-color: #1b2d52;
    background: rgba(27,45,82,0.04);
    box-shadow: 0 0 0 3px rgba(27,45,82,0.08);
}

.request-type-icon  { display: flex; align-items: center; justify-content: center; }
.request-type-label { font-weight: 700; font-size: 15px; color: #1b2240; letter-spacing: -0.01em; }
.request-type-card.selected .request-type-label { color: #1b2d52; }
.request-type-check {
    width: 22px; height: 22px; border-radius: 11px;
    background: #1b2d52;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 700;
}

/* ── RESIDENCE TIME ──────────────────────────────────────────── */
.residence-time-section {
    border-top: 1px solid #e2ddd6;
    padding-top: 20px;
    margin-top: 20px;
}
.residence-time-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #5a607a;
    margin-bottom: 14px;
}

/* ── SUBMITTED SCREEN ───────────────────────────────────────── */
.submitted-screen {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 20px 0 10px;
}
.submitted-icon {
    width: 72px; height: 72px; border-radius: 36px;
    background: #e8f9f2; border: 2px solid #2ab87a;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; margin-bottom: 20px;
}
.submitted-screen h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 26px; color: #1b2240; letter-spacing: -0.02em; margin-bottom: 10px;
}
.submitted-screen > p {
    font-size: 14px; color: #5a607a; line-height: 1.7; max-width: 400px; margin-bottom: 28px;
}
.submitted-meta {
    display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; justify-content: center;
}
.submitted-meta-item {
    background: #f6f4f0; border: 1px solid #e2ddd6;
    border-radius: 10px; padding: 12px 20px; text-align: center; min-width: 130px;
}
.submitted-meta-label {
    font-size: 10px; color: #9298b0;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.submitted-meta-value { font-size: 15px; font-weight: 700; color: #1b2240; }
.submitted-next {
    background: #fdf3dd; border: 1px solid #f0a42a;
    border-radius: 12px; padding: 16px 20px;
    max-width: 420px; display: flex; gap: 12px; text-align: left;
}
.submitted-next > span { font-size: 22px; flex-shrink: 0; }
.submitted-next-title  { font-weight: 700; font-size: 14px; color: #d4891a; margin-bottom: 4px; }
.submitted-next-body   { font-size: 13px; color: #5a607a; line-height: 1.6; }

/* ── WIZARD EXTRAS ───────────────────────────────────────────── */
.wizard-trust-line { text-align: center; font-size: 12px; color: #9298b0; margin-top: 14px; }
.wizard-card-inner { padding: 32px 36px; }

@media (max-width: 640px) {
    .request-type-grid  { grid-template-columns: 1fr; }
    .wizard-card-inner  { padding: 24px 20px; }
    .field {
        margin-bottom: 5px !important;
    }
}
