/* ===== Wizard Layout Styles =====
   Public trip planning wizard layout — sidebar, mobile header, nav, success, etc.
   Shared component styles (vehicle cards, timeline, toggles, etc.) are in wizard-components.css
   ============================================================================== */

/* Full-screen wizard container */
.wizard-container-main {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.wizard-sidebar {
    width: 45%;
    min-width: 400px;
    max-width: 550px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px;
}

.wizard-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.3) 30%,
            rgba(0, 0, 0, 0.3) 60%,
            rgba(0, 0, 0, 0.7) 100%);
}

/* Sidebar Logo */
.sidebar-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 32px;
}

.sidebar-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Sidebar Progress */
.sidebar-progress {
    position: relative;
    z-index: 1;
    margin-bottom: auto;
}

.sidebar-progress .progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-progress .progress-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, var(--accent-lime), var(--accent-teal));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.sidebar-progress .progress-text {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Sidebar Content */
.sidebar-content {
    position: relative;
    z-index: 1;
    margin-top: auto;
    margin-bottom: 80px;
}

.wizard-mobile-header {
    display: none;
}

/* Sidebar Title & Description */
.sidebar-content h2 {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
}

.sidebar-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

/* Sidebar Exit */
.sidebar-exit {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-exit:hover {
    color: white;
}

.sidebar-exit span {
    font-size: 1.1rem;
}

/* Main wizard area */
.wizard-main {
    flex: 1;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    background: white;
    overflow-y: auto;
    max-height: 100vh;
}

/* Step content */
.wizard-step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.wizard-step-content.active {
    display: block;
    margin-top: auto;
    margin-bottom: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-greeting {
    font-size: 0.95rem;
    color: var(--primary-600);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-title {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.step-subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Form elements */
.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input.large {
    font-size: 1.5rem;
    padding: 20px 24px;
    text-align: center;
}

/* Date input */
.date-input-container .form-input {
    padding-right: 48px;
}

/* Navigation buttons */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.btn-back {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
}

.btn-back:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.wizard-nav .btn:disabled {
    background: var(--gray-300);
    color: white;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Success screen */
.success-screen {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 32px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-title {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.success-message {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Error message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
}


/* =====================================================================
   RESPONSIVE — Wizard-layout-specific breakpoints
   ===================================================================== */

/* ---- Desktop to Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
    .wizard-container-main {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }

    .wizard-sidebar {
        display: none;
    }

    .wizard-mobile-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px 20px 14px;
        background-size: cover;
        background-position: center;
        position: sticky;
        top: 0;
        color: white;
        flex-shrink: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    .wizard-mobile-header .mobile-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.75));
        z-index: 1;
    }

    .wizard-mobile-header .mobile-logo {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: white;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .wizard-mobile-header .logo-icon {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    /* Mobile progress bar */
    .mobile-progress {
        position: relative;
        z-index: 2;
        width: 100%;
        max-width: 320px;
    }

    .mobile-progress .progress-track {
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        overflow: hidden;
    }

    .mobile-progress .progress-fill {
        height: 100%;
        width: 20%;
        background: linear-gradient(90deg, var(--accent-lime), var(--accent-teal));
        border-radius: 4px;
        transition: width 0.5s ease;
    }

    .mobile-progress .progress-text {
        display: block;
        margin-top: 6px;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 500;
        text-align: center;
    }

    .wizard-main {
        padding: 28px 24px 40px;
        flex: 1;
        width: 100%;
        overflow-y: auto;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }

    .wizard-step-content.active {
        margin-top: 0;
        margin-bottom: 0;
    }

    .step-title {
        font-size: 1.6rem;
    }

    .step-subtitle {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .form-input.large {
        font-size: 1.2rem;
        padding: 16px 20px;
        text-align: left;
    }

    /* Select element styling */
    select.form-input {
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        padding-right: 40px;
    }

    /* Textarea styling */
    textarea.form-input {
        resize: vertical;
        min-height: 80px;
        line-height: 1.6;
    }

    /* intl-tel-input mobile fixes */
    .iti {
        width: 100%;
    }

    .iti__country-list {
        max-height: 200px;
        width: 100% !important;
        max-width: 100vw;
    }

    .iti--container {
        z-index: 9999;
    }

    /* Error message mobile */
    .error-message {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
}

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {
    .wizard-mobile-header {
        padding: 16px 16px 12px;
    }

    .wizard-mobile-header .mobile-logo {
        font-size: 1.15rem;
        margin-bottom: 10px;
        gap: 8px;
    }

    .wizard-mobile-header .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
        border-radius: 9px;
    }

    .wizard-main {
        padding: 20px 16px 32px;
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    }

    .step-title {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .step-subtitle {
        font-size: 0.92rem;
        margin-bottom: 24px;
        line-height: 1.6;
    }

    .step-greeting {
        font-size: 0.88rem;
    }

    /* Name fields stack on mobile */
    .name-fields-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Form inputs */
    .form-input {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .form-input:focus {
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    }

    .form-input.large {
        font-size: 1.1rem;
        padding: 14px 18px;
        text-align: left;
    }

    .form-label {
        font-size: 0.88rem;
        margin-bottom: 8px;
    }

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

    /* Select element */
    select.form-input {
        padding: 14px 40px 14px 16px;
        font-size: 1rem;
    }

    /* Textarea */
    textarea.form-input {
        min-height: 70px;
        font-size: 0.95rem;
    }

    /* Timeline content form inputs */
    .timeline-content .form-input {
        font-size: 0.95rem;
        padding: 12px 14px;
    }

    /* Date input */
    .date-input-container .form-input {
        padding-right: 48px;
    }

    /* Nav buttons */
    .wizard-nav {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 28px;
        padding-top: 24px;
    }

    .wizard-nav .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 16px;
        font-size: 1rem;
        border-radius: 12px;
        -webkit-tap-highlight-color: transparent;
    }

    .wizard-nav .btn-back {
        order: 2;
        padding: 14px;
    }

    .wizard-nav .btn-primary {
        order: 1;
    }

    .wizard-nav .btn:disabled {
        opacity: 0.5;
    }

    /* Success screen */
    .success-screen {
        padding: 40px 16px;
    }

    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
        margin-bottom: 24px;
    }

    .success-title {
        font-size: 1.5rem;
    }

    .success-message {
        font-size: 0.95rem;
        margin-bottom: 32px;
        line-height: 1.7;
    }

    .success-screen .btn {
        width: 100%;
        padding: 16px;
    }

    /* Registration closed notice */
    .registration-closed-notice {
        margin: 32px auto;
        padding: 28px 16px;
    }

    .registration-closed-notice .closed-icon {
        font-size: 3rem;
    }

    .registration-closed-notice h2 {
        font-size: 1.35rem;
    }

    .registration-closed-notice p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .registration-closed-notice .btn-back-home {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* intl-tel-input mobile overrides */
    .iti__selected-flag {
        padding: 0 8px;
    }

    .iti__country-list {
        max-height: 180px;
    }
}

/* ---- Small phone (≤ 480px) ---- */
@media (max-width: 480px) {
    .wizard-mobile-header {
        padding: 12px 12px 10px;
    }

    .wizard-mobile-header .mobile-logo {
        font-size: 1.05rem;
        margin-bottom: 8px;
        gap: 6px;
    }

    .wizard-mobile-header .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1.05rem;
        border-radius: 8px;
    }

    .mobile-progress .progress-text {
        font-size: 0.7rem;
        margin-top: 4px;
    }

    .wizard-main {
        padding: 16px 14px 28px;
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    }

    .step-title {
        font-size: 1.15rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    .step-subtitle {
        font-size: 0.84rem;
        margin-bottom: 20px;
        line-height: 1.55;
    }

    .step-greeting {
        font-size: 0.82rem;
        margin-bottom: 6px;
    }

    /* Form inputs compact */
    .form-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .form-input.large {
        font-size: 1rem;
        padding: 12px 14px;
    }

    .form-label {
        font-size: 0.84rem;
        margin-bottom: 6px;
    }

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

    /* Select compact */
    select.form-input {
        padding: 12px 36px 12px 14px;
        font-size: 0.95rem;
        background-position: right 12px center;
    }

    /* Timeline content form inputs */
    .timeline-content .form-input {
        font-size: 0.88rem;
        padding: 10px 12px;
    }

    /* Nav compact */
    .wizard-nav {
        margin-top: 22px;
        padding-top: 18px;
        gap: 8px;
    }

    .wizard-nav .btn {
        padding: 14px;
        font-size: 0.95rem;
    }

    .wizard-nav .btn-back {
        padding: 12px;
    }

    /* Success compact */
    .success-screen {
        padding: 28px 12px;
    }

    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .success-title {
        font-size: 1.2rem;
    }

    .success-message {
        font-size: 0.85rem;
        margin-bottom: 28px;
    }

    /* Registration notice compact */
    .registration-closed-notice {
        margin: 20px auto;
        padding: 20px 12px;
    }

    .registration-closed-notice .closed-icon {
        font-size: 2.5rem;
        margin-bottom: 14px;
    }

    .registration-closed-notice .closed-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
        margin-bottom: 18px;
    }

    .registration-closed-notice h2 {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .registration-closed-notice p {
        font-size: 0.82rem;
        margin-bottom: 24px;
    }

    .registration-closed-notice .btn-back-home {
        padding: 12px 20px;
        font-size: 0.88rem;
        width: 100%;
        justify-content: center;
    }

    .registration-closed-notice .btn-login-alt {
        font-size: 0.82rem;
    }

    /* Error message compact */
    .error-message {
        font-size: 0.82rem;
        padding: 10px 12px;
    }
}

/* ---- Extra small (≤ 360px) ---- */
@media (max-width: 360px) {
    .wizard-main {
        padding: 14px 10px 24px;
    }

    .step-title {
        font-size: 1.05rem;
    }

    .step-subtitle {
        font-size: 0.8rem;
    }

    .wizard-nav .btn {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* ---- Landscape phone ---- */
@media (max-width: 768px) and (orientation: landscape) {
    .wizard-mobile-header {
        padding: 10px 16px 8px;
        flex-direction: row;
        gap: 16px;
    }

    .wizard-mobile-header .mobile-logo {
        margin-bottom: 0;
        font-size: 1rem;
    }

    .mobile-progress {
        flex: 1;
        max-width: 200px;
    }

    .wizard-main {
        padding: 16px 24px 24px;
    }
}
