/* ==========================================================================
   Quote Form - Frontend Luxury Stylesheet
   Brand Colors based on First Choice Tax Pros (Gold & Emerald Green)
   ========================================================================== */
:root {
    /* Brand Metallic Gold Palette */
    --qf-gold-light: #fef3c7;
    --qf-gold-amber: #f59e0b;
    --qf-gold-primary: #e5a812;
    --qf-gold-dark: #b45309;
    --qf-gold-deep: #78350f;
    --qf-gold-gradient: linear-gradient(135deg, #f5b324 0%, #e5a812 50%, #c98a0c 100%);
    --qf-gold-gradient-hover: linear-gradient(135deg, #f8c346 0%, #edb624 50%, #d4981c 100%);

    /* Brand Emerald Green Palette */
    --qf-emerald-light: #ecfdf5;
    --qf-emerald-tint: #d1fae5;
    --qf-emerald-border: #a7f3d0;
    --qf-emerald-accent: #10b981;
    --qf-emerald-primary: #059669;
    --qf-emerald-dark: #047857;
    --qf-emerald-deep: #064e3b;

    /* Neutrals & Dark Contrast */
    --qf-text-dark: #0f172a;
    --qf-text-body: #334155;
    --qf-text-muted: #64748b;
    --qf-border-color: #cbd5e1;
    --qf-border-focus: #059669;
    --qf-bg-card: #ffffff;
    --qf-bg-soft: #f8fafc;
    --qf-radius: 8px;
    --qf-radius-card: 16px;
    --qf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.qf-container {
    width: 100%;
    max-width: 760px;
    margin: 30px auto;
    font-family: var(--qf-font);
    box-sizing: border-box;
    color: var(--qf-text-body);
}

.qf-container *,
.qf-container *::before,
.qf-container *::after {
    box-sizing: border-box;
}

/* Card Container with Signature Gold & Emerald Top Accent */
.qf-card {
    position: relative;
    background: var(--qf-bg-card);
    border-radius: var(--qf-radius-card);
    padding: 38px 42px;
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.07), 0 4px 12px -2px rgba(6, 95, 70, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* Luxury Dual-Tone Accent Bar (Gold -> Emerald) */
.qf-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b45309 0%, #f59e0b 30%, #059669 70%, #047857 100%);
}

/* Card Title */
.qf-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--qf-text-dark);
    margin: 0 0 24px 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

/* Grid Layout */
.qf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

.qf-field-group {
    display: flex;
    flex-direction: column;
}

.qf-full-width {
    grid-column: 1 / -1;
}

/* Labels */
.qf-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 7px;
    display: block;
}

.qf-required {
    color: #dc2626;
    margin-left: 2px;
}

/* Inputs, Selects & Textarea */
.qf-input,
.qf-select,
.qf-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    border: 1.5px solid var(--qf-border-color);
    border-radius: var(--qf-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    line-height: normal;
}

.qf-input {
    height: 44px;
    padding: 0 14px;
}

.qf-input::placeholder,
.qf-textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Emerald Green focus with subtle glow */
.qf-container input:focus,
.qf-container input:focus-visible,
.qf-container select:focus,
.qf-container select:focus-visible,
.qf-container textarea:focus,
.qf-container textarea:focus-visible,
.qf-input:focus,
.qf-select:focus,
.qf-textarea:focus {
    border-color: var(--qf-border-focus) !important;
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14) !important;
}

/* Autofill fix */
.qf-container input:-webkit-autofill,
.qf-container input:-webkit-autofill:hover, 
.qf-container input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    outline: none !important;
    border-color: var(--qf-border-focus) !important;
}

/* Select wrapper & arrow */
.qf-select-wrapper {
    position: relative;
    width: 100%;
}

.qf-select {
    height: 44px;
    padding: 0 36px 0 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-color: #ffffff;
}

.qf-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    color: #059669;
}

/* Date input */
.qf-date-wrapper {
    position: relative;
    width: 100%;
}

.qf-input-date {
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13.5px;
}

/* Textarea */
.qf-textarea {
    min-height: 88px;
    padding: 10px 14px;
    resize: vertical;
}

/* Error message under field */
.qf-field-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

.qf-input.qf-has-error,
.qf-select.qf-has-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* ==========================================================================
   Summary Card (Clean & Prominent)
   ========================================================================== */
.qf-summary-card {
    background-color: var(--qf-bg-soft);
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--qf-emerald-primary);
    border-radius: 12px;
    padding: 18px 22px;
    margin-top: 24px;
}

.qf-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #475569;
    margin-bottom: 10px;
}

.qf-summary-row:last-of-type {
    margin-bottom: 0;
}

.qf-summary-label {
    font-weight: 500;
}

.qf-summary-val {
    font-weight: 600;
    color: var(--qf-text-dark);
    text-align: right;
}

.qf-sum-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700 !important;
    background: #ecfdf5;
    color: #065f46 !important;
    border: 1px solid #a7f3d0;
}

/* ==========================================================================
   Info / Notice Banner (Emerald Trust Style)
   ========================================================================== */
.qf-security-banner {
    background: var(--qf-emerald-light);
    border: 1px solid var(--qf-emerald-border);
    border-radius: var(--qf-radius);
    padding: 12px 16px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qf-sec-icon {
    display: flex;
    align-items: center;
    color: var(--qf-emerald-dark);
    flex-shrink: 0;
}

.qf-sec-text {
    font-size: 13px;
    color: var(--qf-emerald-deep);
    line-height: 1.45;
    font-weight: 500;
}

/* ==========================================================================
   Main CTA Submit Button (Rich Metallic Gold)
   ========================================================================== */
.qf-submit-wrap {
    margin-top: 20px;
}

.qf-submit-button {
    width: 100%;
    height: 48px;
    background: var(--qf-gold-gradient);
    color: #0f172a;
    border: none;
    border-radius: var(--qf-radius);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.18s ease;
    box-shadow: 0 4px 14px rgba(229, 168, 18, 0.35);
    letter-spacing: 0.2px;
}

.qf-submit-button:hover {
    background: var(--qf-gold-gradient-hover);
    box-shadow: 0 6px 18px rgba(229, 168, 18, 0.45);
    transform: translateY(-1px);
}

.qf-submit-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(229, 168, 18, 0.3);
}

.qf-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.qf-btn-icon {
    flex-shrink: 0;
    color: #0f172a;
}

/* Spinner Loader */
.qf-loader {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(15, 23, 42, 0.25);
    border-top-color: #0f172a;
    border-radius: 50%;
    animation: qf-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes qf-spin {
    to { transform: rotate(360deg); }
}

/* Trust Badges */
.qf-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 12px;
    color: #475569;
    flex-wrap: wrap;
}

.qf-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.qf-trust-secure {
    color: #047857;
}

.qf-trust-instant {
    color: #b45309;
}

.qf-trust-privacy {
    color: #065f46;
}

/* Alert response */
.qf-response-msg {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.45;
}

.qf-response-msg.qf-resp-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.qf-response-msg.qf-resp-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ==========================================================================
   Success Card (Celebratory Gold & Emerald)
   ========================================================================== */
.qf-success-card {
    text-align: center;
    padding: 24px 10px;
}

.qf-success-icon-wrap {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.qf-success-icon-wrap svg {
    stroke: #059669;
    filter: drop-shadow(0 4px 10px rgba(5, 150, 105, 0.25));
}

.qf-success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--qf-text-dark);
    margin: 0 0 8px 0;
}

.qf-success-subtitle {
    font-size: 14.5px;
    color: var(--qf-text-muted);
    margin: 0 0 24px 0;
}

.qf-success-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: 3px solid var(--qf-emerald-primary);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    max-width: 480px;
    margin: 0 auto 24px auto;
}

.qf-receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
    font-size: 13.5px;
}

.qf-receipt-row:last-child {
    margin-bottom: 0;
}

.qf-receipt-label {
    color: #64748b;
    font-weight: 500;
}

.qf-receipt-val {
    color: #0f172a;
    font-weight: 600;
}

.qf-btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--qf-radius);
    padding: 11px 22px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.qf-btn-secondary:hover {
    background: #f8fafc;
    border-color: #059669;
    color: #059669;
}

/* ==========================================================================
   STEP 1: Appointment Type Selection (Virtual vs In-Person)
   ========================================================================== */
.qf-step1-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--qf-text-dark);
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.qf-step1-subtitle {
    font-size: 14.5px;
    color: var(--qf-text-muted);
    margin: 0 0 24px 0;
}

.qf-type-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qf-type-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
    outline: none !important;
}

.qf-type-option:hover {
    border-color: #94a3b8;
    background: #fcfdfc;
}

.qf-type-option.qf-type-selected {
    border-color: var(--qf-emerald-primary);
    background: linear-gradient(to right, #f2fcf6 0%, #ffffff 100%);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.12);
}

.qf-type-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qf-radio-outer {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: all 0.15s ease;
}

.qf-type-option.qf-type-selected .qf-radio-outer {
    border-color: var(--qf-emerald-primary);
    background: var(--qf-emerald-primary);
}

.qf-radio-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.15s ease;
}

.qf-type-option.qf-type-selected .qf-radio-inner {
    background: #ffffff;
}

.qf-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

/* Virtual selection icon (Gold highlight) */
.qf-type-option[data-type="virtual"].qf-type-selected .qf-type-icon {
    background: #fef3c7;
    color: #b45309;
}

/* In-Person selection icon (Emerald highlight) */
.qf-type-option[data-type="in_person"].qf-type-selected .qf-type-icon {
    background: #d1fae5;
    color: #047857;
}

.qf-type-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.qf-type-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--qf-text-dark);
    line-height: 1.3;
}

.qf-type-desc {
    font-size: 13.5px;
    color: var(--qf-text-muted);
    line-height: 1.4;
}

.qf-step1-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 24px 0 18px 0;
}

.qf-step1-footer {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.qf-selected-indicator {
    font-size: 14.5px;
    color: #475569;
}

.qf-selected-indicator strong {
    color: var(--qf-emerald-dark);
    font-weight: 700;
}

.qf-next-btn {
    margin-top: 2px;
}

/* ==========================================================================
   STEP 2: Top Bar & Real-time Slot Sync Info
   ========================================================================== */
.qf-step2-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qf-active-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.qf-pill-virtual {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.qf-pill-virtual .qf-pill-icon {
    color: #b45309;
}

.qf-pill-inperson {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.qf-pill-inperson .qf-pill-icon {
    color: #059669;
}

.qf-pill-icon {
    display: flex;
    align-items: center;
}

.qf-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.qf-back-link:hover {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669;
}

.qf-slot-sync-info {
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.35;
    font-weight: 600;
}

.qf-slot-sync-info.qf-sync-loading {
    color: #0284c7;
}

.qf-slot-sync-info.qf-sync-ok {
    color: #059669;
}

.qf-slot-sync-info.qf-sync-warn {
    color: #dc2626;
}

.qf-select option:disabled {
    color: #94a3b8;
    background-color: #f8fafc;
}

/* ==========================================================================
   Responsive Breakpoints: Tablet & Mobile
   ========================================================================== */

/* Tablet & Mobile Screens (<= 768px) */
@media screen and (max-width: 768px) {
    .qf-container {
        padding: 0 12px;
        margin: 20px auto;
    }

    .qf-card {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .qf-card-title,
    .qf-step1-title {
        font-size: 21px;
        margin-bottom: 16px;
    }
}

/* Mobile Screens (<= 560px) */
@media screen and (max-width: 560px) {
    .qf-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .qf-card {
        padding: 22px 16px;
    }

    .qf-step2-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .qf-back-link {
        width: 100%;
        justify-content: center;
    }

    .qf-trust-badges {
        gap: 12px;
    }
}
