/* =========================================
   MODERN TAX FILING WIZARD - CALM PALETTE
   ========================================= */

:root {
    /* Original Calm Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    /* Background & Surface */
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --surface-light: #f8fafc;
    
    /* Text */
    --text-main: #0f172a;
    --text-sub: #64748b;
    --text-muted: #94a3b8;
    
    /* Borders & Dividers */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    /* Status Colors */
    --error-color: #ef4444;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --success-text: #15803d;
    --warning-bg: #fef3c7;
    --warning-border: #fcd34d;
    --warning-text: #d97706;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wrapper Scope */
#tfw-wizard-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    padding: 30px 20px;
    box-sizing: border-box;
    min-height: 100vh;
}

/* =========================================
   MAIN FORM CONTAINER
   ========================================= */
.form-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 800px;
    padding: 48px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    margin: 0 auto;
    box-sizing: border-box;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   FORM HEADER
   ========================================= */
.form-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.header-left {
    text-align: left;
    flex: 1;
}

.form-header h2 {
    margin: 0 0 12px 0;
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.form-header p {
    margin: 0;
    color: var(--text-sub);
    font-size: 16px;
    line-height: 1.5;
}

/* Estimate Section (Right Side of Header) */
.header-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 18px 24px;
    background: var(--surface-light);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    min-width: 170px;
}

.estimate-label {
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-select {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all var(--transition-base);
}

.currency-select:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.currency-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.price-display {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    transition: all var(--transition-smooth);
}

.price-updated {
    animation: pricePopup 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: var(--primary-color);
}

@keyframes pricePopup {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* =========================================
   PROGRESS BAR
   ========================================= */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 15px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15px;
    right: 15px;
    transform: translateY(-50%);
    height: 3px;
    background: var(--border-color);
    border-radius: 10px;
    z-index: 0;
}

.step-indicator {
    width: 42px;
    height: 42px;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-sub);
    position: relative;
    z-index: 1;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.step-indicator.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.step-indicator.completed {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* =========================================
   FORM STEPS & SECTIONS
   ========================================= */
.form-step {
    display: none; 
}

.form-step.active {
    display: block;
    animation: fadeInSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlide {
    from { 
        opacity: 0; 
        transform: translateX(15px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

.question-section {
    margin-bottom: 32px;
    padding: 26px;
    background: var(--surface-light);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.question-section:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.question-section:last-child {
    margin-bottom: 0;
}

#rental-section {
    animation: expandDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 26px;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding: 26px;
    }
}

.question-label {
    margin-bottom: 20px; 
    display: block; 
    font-size: 17px; 
    font-weight: 600;
    color: var(--text-main);
}

.required-star {
    color: var(--error-color);
    margin-left: 4px;
}

/* =========================================
   INPUTS & FIELDS (GLOBAL FORM)
   ========================================= */
.form-container input[type="text"], 
.form-container input[type="email"],
.form-container input[type="tel"],
.form-container input[type="number"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    color: var(--text-main);
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all var(--transition-base);
    box-sizing: border-box;
    -webkit-appearance: none;
}

.form-container input:hover {
    border-color: var(--border-hover);
}

.form-container input:focus, 
.form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Specific Input Tweaks */
.form-container input[type="number"] {
    width: 120px;
}

/* Fix for intl-tel-input width */
.iti { 
    width: 100%;
}

/* Contact Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

/* Textarea Styling */
.form-container textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    color: var(--text-main);
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all var(--transition-base);
    box-sizing: border-box;
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
}

.form-container textarea:hover {
    border-color: var(--border-hover);
}

.char-count {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* =========================================
   CHECKBOXES & RADIO CARDS (STANDARD FORM)
   ========================================= */
.checkbox-group-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.checkbox-group-1col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.checkbox-card, .radio-card {
    position: relative;
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: 0;
    background-color: #fff;
}

.checkbox-card:hover, .radio-card:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.checkbox-card input[type="checkbox"], .radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Checkmark (Square) */
.checkmark {
    height: 24px;
    width: 24px;
    min-width: 24px; 
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    background: white;
}

/* Radio Circle */
.radio-mark {
    height: 24px;
    width: 24px;
    min-width: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    background: white;
}

/* Checked States */
.checkbox-card input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.radio-card input:checked ~ .radio-mark {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.radio-card input:checked ~ .radio-mark::after {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}

.checkbox-card input:checked ~ .checkmark::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: 700;
}

/* Disabled State */
.checkbox-card.disabled,
.radio-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.checkbox-card.disabled:hover,
.radio-card.disabled:hover {
    border-color: var(--border-color);
    background-color: #fff;
    transform: none;
    box-shadow: none;
}

/* Label Content */
.label-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.label-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
}

.checkbox-card:hover .label-text, 
.radio-card:hover .label-text {
    color: var(--primary-color);
}

/* Info Icon & Tooltip */
.info-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    z-index: 10; 
    flex-shrink: 0;
}

.info-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #e0e7ff;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.info-icon:hover {
    transform: scale(1.1);
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.tooltip-content {
    visibility: hidden;
    width: 320px;
    background-color: #334155;
    color: #fff;
    text-align: left;
    border-radius: 10px;
    padding: 16px;
    position: absolute;
    z-index: 100;
    bottom: 150%; 
    left: 50%;
    margin-left: -160px; 
    opacity: 0;
    transition: all var(--transition-smooth);
    font-size: 13px;
    line-height: 1.5;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #334155 transparent transparent transparent;
}

.info-icon-wrapper:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    bottom: 135%;
}

/* =========================================
   ALERT BOXES
   ========================================= */
.alert-box {
    background: var(--success-bg);
    border: 2px solid var(--success-border);
    color: var(--success-text);
    padding: 18px 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
    animation: alertSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

@keyframes alertSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.alert-box strong {
    font-weight: 700;
}

.alert-box ul, .alert-box ol {
    margin: 10px 0 0 0;
    padding-left: 24px;
}

.alert-box li {
    margin-bottom: 6px;
}

.alert-content {
    flex: 1;
}

.alert-icon {
    margin-right: 12px;
    font-weight: 700;
    font-size: 20px;
}

/* =========================================
   TERMS & CONDITIONS (SCROLL)
   ========================================= */
.terms-wrapper {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 32px;
    overflow: hidden;
    background-color: var(--surface-light);
    box-shadow: var(--shadow-sm);
}

.terms-box {
    padding: 24px;
    max-height: 320px; 
    overflow-y: auto;
    padding-bottom: 50px;
}

/* Custom Scrollbar */
.terms-box::-webkit-scrollbar {
    width: 8px;
}

.terms-box::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.terms-box::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.terms-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Gradient Overlay */
.terms-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0), rgba(248, 250, 252, 1));
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.terms-wrapper.scrolled-bottom::after {
    opacity: 0;
}

.terms-box ul {
    margin: 0;
    padding-left: 24px;
}

.terms-box li {
    margin-bottom: 14px;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.6;
}

.terms-box li:last-child {
    margin-bottom: 0;
}

/* =========================================
   STEP 4: BIG ICONS (SUBMISSION)
   ========================================= */
.submission-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.big-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px;
    border: 3px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-base);
    background: #fff;
    text-align: center;
    position: relative;
}

.big-icon-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.big-icon-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* When selected */
.big-icon-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.big-icon-card.selected .icon-img {
    transform: scale(1.1);
}

.big-icon-card input:checked ~ span {
    color: var(--primary-color);
    font-weight: 700;
}

.icon-svg {
    margin-bottom: 18px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-smooth);
}

.big-icon-card span {
    font-size: 17px;
    color: var(--text-main);
    font-weight: 600;
}

/* =========================================
   NAVIGATION BUTTONS
   ========================================= */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
    gap: 16px;
}

.form-container button {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-prev {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-sub);
}

.btn-prev:hover {
    background: var(--surface-light);
    color: var(--text-main);
    border-color: var(--border-hover);
    transform: translateX(-2px);
    box-shadow: var(--shadow-md);
}

.btn-next {
    background: var(--primary-color);
    border: none;
    color: white;
    margin-left: auto;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-next:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.btn-next:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.error-msg {
    color: var(--error-color);
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 4px solid var(--error-color);
    border-radius: 8px;
    display: none;
    animation: errorShake 0.3s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =========================================
   SCHEDULER PREMIUM STYLES
   ========================================= */
.scheduler-container {
    margin-top: 24px;
    padding: 32px;
    background: var(--surface-light);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    animation: expandDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.scheduler-header h4 {
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
}

.scheduler-header p {
    margin: 0 0 28px 0;
    color: var(--text-sub);
    font-size: 15px;
}

.scheduler-grid.single-column {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.scheduler-grid label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    display: block;
}

/* Date Input Premium Style */
.date-col input[type="date"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
    transition: all var(--transition-base);
    box-sizing: border-box;
    color: var(--text-main);
}

.date-col input[type="date"]:hover {
    border-color: var(--border-hover);
}

.date-col input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Slots Wrapper */
.slots-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    max-height: 340px;
    overflow-y: auto;
    padding: 4px;
}

/* Custom Scrollbar for Slots */
.slots-wrapper::-webkit-scrollbar {
    width: 8px;
}

.slots-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.slots-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.slots-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Slot Buttons Premium */
.time-slot-btn {
    background: #fff;
    border: 2px solid var(--border-color);
    padding: 14px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-base);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.time-slot-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.time-slot-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.no-date-msg {
    font-size: 15px;
    color: var(--text-sub);
    font-style: italic;
    text-align: center;
    padding: 32px;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    #tfw-wizard-container {
        padding: 20px 15px;
    }

    .form-container {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .form-header {
        flex-direction: column;
        gap: 20px;
    }

    .header-left {
        max-width: 100%;
    }

    .header-right {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .checkbox-group-2col {
        grid-template-columns: 1fr;
    }

    .submission-options {
        grid-template-columns: 1fr;
    }

    .nav-buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn-prev, .btn-next {
        width: 100%;
        margin-left: 0;
    }

    .progress-bar {
        padding: 0 10px;
    }

    .step-indicator {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .slots-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 24px 20px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .price-display {
        font-size: 28px;
    }

    .question-section {
        padding: 20px;
    }
}