/* ============================================================
   Falcon West Intake Form — v1.7.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ---------- Wrapper & Background ---------- */
.fwif-wrapper {
    background-color: #15445D;
    padding: 2rem 1rem;
    min-height: 100%;
    font-family: 'Montserrat', sans-serif;
    color: #1d2327;
}

/* ---------- Phone Banner ---------- */
.fwif-phone-banner {
    max-width: 540px;
    margin: 0 auto 1.25rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.5;
}

.fwif-phone-banner a {
    color: #f5c49b;
    font-weight: 700;
    text-decoration: none;
}

.fwif-phone-banner a:hover {
    text-decoration: underline;
}

.fwif-phone-banner .fwif-hours {
    display: block;
    margin-top: 0.2rem;
    opacity: 0.85;
    font-size: 0.8rem;
}

/* ---------- Card ---------- */
.fwif-card {
    max-width: 540px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 36px;
}

/* ---------- Progress Indicator ---------- */
.fwif-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 2rem;
}

.fwif-progress-step-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.fwif-progress-step-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.fwif-progress-step.active ~ .fwif-progress-step-label,
.fwif-progress-step-wrap:has(.fwif-progress-step.active) .fwif-progress-step-label,
.fwif-progress-step-wrap:has(.fwif-progress-step.completed) .fwif-progress-step-label {
    color: #15445D;
}

.fwif-progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.fwif-progress-step.active {
    background: #D2793D;
    color: #ffffff;
}

.fwif-progress-step.completed {
    background: #15445D;
    color: #ffffff;
}

.fwif-progress-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 18px 6px 0;
    max-width: 60px;
    transition: background 0.2s;
}

.fwif-progress-connector.completed {
    background: #D2793D;
}

/* ---------- Step Title ---------- */
.fwif-step-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #15445D;
    margin: 0 0 0.25rem;
    line-height: 1.25;
}

.fwif-step-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #606a73;
    margin: -0.5rem 0 1.25rem;
}

/* ---------- Fields ---------- */
.fwif-field {
    margin-bottom: 1.1rem;
}

.fwif-field-row {
    display: flex;
    gap: 1rem;
}

.fwif-field-row .fwif-field {
    flex: 1;
}

.fwif-field-row.fwif-field-row-address .fwif-field-city {
    flex: 3;
}

.fwif-field-sm {
    flex: 1 !important;
    min-width: 70px;
    max-width: 110px;
}

.fwif-field-hint {
    display: block;
    font-size: 0.85em;
    font-style: italic;
    line-height: 1.3;
    margin-top: 0.1rem;
    margin-bottom: 0.4rem;
    opacity: 0.7;
}

.fwif-field label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #1d2327;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.fwif-required {
    color: #c0392b;
}

.fwif-optional {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.8rem;
}

.fwif-helper-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0.1rem 0 0.6rem;
    line-height: 1.4;
    font-style: italic;
}

/* ---------- Inputs, Selects & Textareas ---------- */
.fwif-wrapper input[type="text"],
.fwif-wrapper input[type="email"],
.fwif-wrapper input[type="tel"],
.fwif-wrapper input[type="date"],
.fwif-wrapper select,
.fwif-wrapper textarea {
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #1d2327;
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.fwif-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
    cursor: pointer;
}

.fwif-wrapper input[type="text"]:focus,
.fwif-wrapper input[type="email"]:focus,
.fwif-wrapper input[type="tel"]:focus,
.fwif-wrapper input[type="date"]:focus,
.fwif-wrapper select:focus,
.fwif-wrapper textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.fwif-wrapper textarea {
    resize: vertical;
    min-height: 90px;
}

/* ---------- Tile Groups (radio buttons styled as tiles) ---------- */
.fwif-tile-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Vertical stack variant — used for scheduling */
.fwif-tile-group-stack {
    flex-direction: column;
    flex-wrap: nowrap;
}

/* Day-group wrapper for schedule step */
.fwif-schedule-day-group {
    margin-top: 0.75rem;
}

.fwif-schedule-day-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #15445D;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

/* Two-column grid variant — used for scheduling day/time pairs */
.fwif-tile-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0;
}

.fwif-tile-group-grid .fwif-tile {
    width: 100%;
}

.fwif-tile-group-grid .fwif-tile span {
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
}

.fwif-tile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.fwif-tile-group-stack .fwif-tile {
    width: 100%;
}

.fwif-tile input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.fwif-tile span {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d2327;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    user-select: none;
    white-space: nowrap;
}

.fwif-tile-group-stack .fwif-tile span {
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
}

.fwif-tile.fwif-tile-center span {
    text-align: center;
    justify-content: center;
}

.fwif-tile:hover span {
    border-color: #15445D;
    background: #eef4f7;
}

.fwif-tile input[type="radio"]:checked + span {
    border-color: #15445D;
    background: #15445D;
    color: #ffffff;
    font-weight: 700;
}

.fwif-tile-group-value .fwif-tile span {
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
}

/* Scheduling tile sub-label */
.fwif-tile-sublabel {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: #64748b;
    margin-top: 0.15rem;
}

.fwif-tile input[type="radio"]:checked + span .fwif-tile-sublabel {
    color: #c8dce6;
}

/* ---------- Checkbox ---------- */
.fwif-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.fwif-checkbox-label input[type="checkbox"] {
    width: auto;
    height: auto;
    appearance: auto;
    -webkit-appearance: auto;
    background: none;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* ---------- Consent Gate (Step 1) ---------- */
.fwif-consent-gate {
    border: 1.5px solid rgba(21, 68, 93, 0.18);
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(21, 68, 93, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.fwif-consent-text {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #434343;
    line-height: 1.6;
}

.fwif-consent-text a {
    color: #15445D;
    text-decoration: underline;
}

.fwif-consent-divider {
    border: none;
    border-top: 1px solid rgba(21, 68, 93, 0.15);
    margin: 0.75rem 0;
}

.fwif-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #1d2327;
    line-height: 1.5;
}

.fwif-consent-check input[type="checkbox"] {
    width: auto;
    height: auto;
    appearance: auto;
    -webkit-appearance: auto;
    background: none;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
    margin-top: 3px;
    cursor: pointer;
}

/* ---------- Consent Box (Step 4 — review) ---------- */
.fwif-consent-box {
    border: 1.5px solid rgba(21, 68, 93, 0.18);
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(21, 68, 93, 0.08);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}

/* ---------- Buttons ---------- */
.fwif-btn {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 9999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.fwif-btn:active {
    transform: scale(0.98);
}

/* Primary (orange) */
.fwif-btn-next,
.fwif-btn-submit {
    background: #D2793D;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.fwif-btn-next:hover,
.fwif-btn-submit:hover {
    background: #b8622f;
    color: #ffffff;
}

.fwif-btn-submit:disabled {
    background: #c4a68a;
    cursor: not-allowed;
}

/* Standalone next button (only child) — center it */
.fwif-btn-row-right .fwif-btn-next {
    display: block;
    margin: 0 auto;
}

/* Secondary (ghost) */
.fwif-btn-secondary {
    background: transparent;
    color: #15445D;
    border: 2px solid #15445D;
    box-shadow: none;
}

.fwif-btn-secondary:hover {
    background: #15445D;
    color: #ffffff;
}

/* Button rows */
.fwif-btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.75rem;
}

.fwif-btn-row-right {
    justify-content: center;
}

/* ---------- Inline error ---------- */
.fwif-error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #d63638;
}

/* ---------- Review Summary ---------- */
.fwif-review-summary {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: #f8fafc;
    font-size: 0.9rem;
    line-height: 1.6;
}

.fwif-review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.6;
}

.fwif-review-section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #15445D;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.75rem 0 0.3rem;
    border-top: 1px solid #e2e8f0;
    text-align: left;
}

.fwif-review-table tr:first-child .fwif-review-section-title {
    border-top: none;
    padding-top: 0;
}

.fwif-review-label {
    font-weight: 600;
    color: #15445D;
    padding: 0.25rem 1rem 0.25rem 0;
    vertical-align: top;
    white-space: nowrap;
    width: 40%;
}

.fwif-review-value {
    color: #1d2327;
    padding: 0.25rem 0;
    vertical-align: top;
    word-break: break-word;
}

/* ---------- Error Message ---------- */
.fwif-error-message {
    margin-top: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 0.875rem;
}

/* ---------- Validation Error States ---------- */
.fwif-field-error input,
.fwif-field-error select,
.fwif-field-error textarea {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.fwif-field-error-msg {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #d63638;
}

/* ---------- Success Message ---------- */
.fwif-success-message {
    text-align: center;
    padding: 1.5rem 0;
}

.fwif-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #D2793D;
    color: #ffffff;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.fwif-success-message h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #15445D;
    margin: 0 0 0.75rem;
}

.fwif-success-message p {
    font-size: 0.95rem;
    color: #444;
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

/* ---------- Admin Badges ---------- */
.fwif-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.fwif-badge-business { background: #dbeafe; color: #1e40af; }
.fwif-badge-personal { background: #d1fae5; color: #065f46; }
.fwif-badge-current  { background: #ede9fe; color: #5b21b6; }
.fwif-badge-general  { background: #f3f4f6; color: #374151; }

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
    .fwif-card {
        padding: 1.25rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .fwif-wrapper {
        padding: 0;
    }

    .fwif-phone-banner {
        border-radius: 0;
        margin-bottom: 0;
        border-left: none;
        border-right: none;
    }

    .fwif-field-row {
        flex-direction: column;
        gap: 0;
    }

    .fwif-field-row.fwif-field-row-address {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .fwif-field-row.fwif-field-row-address .fwif-field-city {
        flex: 100%;
    }

    .fwif-field-sm {
        max-width: none;
        flex: 1 !important;
    }

    .fwif-tile-group-value {
        gap: 0.4rem;
    }

    .fwif-tile-group-value .fwif-tile span {
        font-size: 0.78rem;
        padding: 0.38rem 0.6rem;
    }

    .fwif-btn-row {
        flex-wrap: wrap;
    }

    .fwif-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .fwif-card {
        padding: 1rem 0.85rem;
    }

    .fwif-tile-group {
        gap: 0.4rem;
    }

    .fwif-tile span {
        padding: 0.4rem 0.65rem;
        font-size: 0.82rem;
    }

    .fwif-tile-group-grid {
        grid-template-columns: 1fr;
    }
}
