/* ============================================================
   Isuzu Dealer Lead Capture System - Mobile-First Styles
   Base: 375px mobile viewport
   ============================================================ */

/* Font Face - Futura */
@font-face {
    font-family: 'Futura';
    src: url('Futura Md BT Medium.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Futura';
    src: url('Futura Md BT Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables */
:root {
    --primary-red: #EB1D24;
    --primary-dark: #1a1a2e;
    --gradient-dark: #0a0a1a;
    --gradient-sky: #87CEEB;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #999999;
    --success-green: #28a745;
    --warning-orange: #ff9800;
    --error-red: #dc3545;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --font-family: 'Futura', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    min-height: 100vh;
    background: url('../images/form_page.jpg') no-repeat center top fixed;
    background-size: cover;
    overflow-x: hidden;
}

body.page-dashboard {
    background: url('../images/booking_landing.jpg') no-repeat center top fixed;
    background-size: cover;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   Header / Branding Bar
   ============================================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__logo-left {
    width: 100px;
    height: auto;
}

.header__logo-right {
    width: 70px;
    height: auto;
}

/* ============================================================
   Page Container
   ============================================================ */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    padding: 260px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================================
   Glass Card Component
   ============================================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 24px 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.glass-card--white {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Dealer Login - Shiny Glass Card */
.glass-card--dealer-login {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 32px 24px;
    max-width: 460px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.glass-card--dealer-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.glass-card--dealer-login::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.glass-card--dealer-login .form-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.glass-card--dealer-login .form-label {
    min-width: 110px;
    margin-bottom: 0;
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
    text-align: right;
    flex-shrink: 0;
}

.glass-card--dealer-login .form-input,
.glass-card--dealer-login .form-select {
    flex: 1;
    border-radius: 25px;
    padding: 12px 18px;
    font-size: 0.9rem;
}

.glass-card--dealer-login .form-select {
    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='%23EB1D24' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-color: var(--white) !important;
}

.glass-card--dealer-login .form-error {
    padding-left: 126px;
}

.glass-card--dealer-login .form-group:last-child {
    margin-top: 24px;
}

.glass-card--dealer-login {
    position: relative;
    overflow: visible;
}

.dealer-login-btn {
    margin-top: -24px;
    width: 200px !important;
    z-index: 10;
}

/* ============================================================
   Form Styles
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glass-card--white .form-label {
    color: var(--dark-gray);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    background: var(--white);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(235, 29, 36, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input--readonly {
    background: var(--light-gray);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    background: var(--white);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    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='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-select:focus {
    box-shadow: 0 0 0 3px rgba(235, 29, 36, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-error {
    display: none;
    font-size: 0.75rem;
    color: #ff6b6b;
    margin-top: 4px;
    padding-left: 16px;
}

.form-error.visible {
    display: block;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    width: 50%;
    text-align: center;
}

.btn--primary {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(235, 29, 36, 0.4);
}

.btn--primary:hover {
    background: #c9171d;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(235, 29, 36, 0.5);
}

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

.btn--secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn--outline {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn--outline:hover {
    background: var(--primary-red);
    color: var(--white);
}

.btn--small {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn--disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Gradient Button with Gradient Border (double pseudo-element approach) */
.btn.btn--gradient {
    font-family: Futura;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px 32px;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    background: transparent;
    border: none;
    border-radius: 12px;
}

/* Border gradient layer */
.btn.btn--gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(45deg, #AE241A 0%, #2B0908 100%);
    z-index: -2;
}

/* Button face gradient layer */
.btn.btn--gradient::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 10px;
    background: linear-gradient(to bottom, #b11d12 0%, #5E110D 100%);
    z-index: -1;
}


.btn.btn--gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.5);
}

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

/* ============================================================
   Section Headings
   ============================================================ */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
}

.section-title--italic {
    font-style: italic;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 28px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.glass-card--white .section-title {
    color: var(--dark-gray);
}

/* ============================================================
   Hero / Vehicle Section
   ============================================================ */
.hero-section {
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 10px;
}

.hero-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.hero-section__subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-section__image {
    width: 100%;
    max-width: 320px;
    margin: 16px auto;
    border-radius: var(--border-radius);
}

/* ============================================================
   Landing Page Specific
   ============================================================ */
.landing-branding {
    text-align: center;
    padding: 30px 16px 10px;
}

.landing-branding__tagline {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.landing-branding__price {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 4px;
}

/* ============================================================
   Dashboard (Post-Login)
   ============================================================ */
.dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 20px 16px;
    text-align: center;
    position: relative;
}

.dashboard .btn--gradient {
    position: absolute;
    bottom: 10%;
    width: auto;
}

.dashboard__welcome {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.dashboard__dealer-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
}

.dashboard__cta-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dashboard__logout {
    position: absolute;
    bottom: 5%;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.dashboard__logout:hover {
    color: var(--white);
}

.dashboard__headline {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    min-width: 300px;
}

.dashboard__cost {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
}

/* ============================================================
   Loading Overlay
   ============================================================ */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: var(--white);
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 400;
}

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

/* ============================================================
   Toast / Notification
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 360px;
}

.toast {
    display: none;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease;
}

.toast.show {
    display: block;
}

.toast--success {
    background: var(--success-green);
    color: var(--white);
}

.toast--error {
    background: var(--error-red);
    color: var(--white);
}

.toast--warning {
    background: var(--warning-orange);
    color: var(--white);
}

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

/* ============================================================
   Network Error Screen
   ============================================================ */
.network-error {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    text-align: center;
}

.network-error.active {
    display: flex;
}

.network-error__icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.network-error__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.network-error__message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.network-error__actions {
    display: flex;
    gap: 12px;
}

/* ============================================================
   Offline Banner
   ============================================================ */
.offline-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 16px;
    background: var(--warning-orange);
    color: var(--white);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10001;
    animation: slideDown 0.3s ease;
}

.offline-banner.active {
    display: block;
}

/* ============================================================
   Toggle Buttons (Vehicle Make, Yes/No)
   ============================================================ */
.toggle-group {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: transparent;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.glass-card--white .toggle-btn {
    color: var(--dark-gray);
    border-color: var(--medium-gray);
}

.toggle-btn.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

.toggle-btn:hover:not(.active) {
    border-color: var(--primary-red);
}

/* ============================================================
   Radio Toggle Group
   ============================================================ */
.radio-toggle-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.radio-toggle {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: transparent;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.glass-card--white .radio-toggle {
    color: var(--dark-gray);
    border-color: var(--medium-gray);
}

.radio-toggle.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

/* ============================================================
   OTP Input
   ============================================================ */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    outline: none;
    transition: var(--transition);
}

.otp-input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(235, 29, 36, 0.2);
}

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

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--white);
}

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

.success-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.success-message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.lead-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.lead-summary__item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.lead-summary__item:last-child {
    border-bottom: none;
}

.lead-summary__label {
    font-weight: 700;
    color: var(--white);
}

/* ============================================================
   Navigation Buttons (Back/Next)
   ============================================================ */
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.nav-buttons .btn {
    flex: 1;
}

.nav-buttons--edge {
    margin-top: -24px;
    z-index: 10;
    justify-content: center;
    gap: 16px;
}

.nav-buttons--edge .nav-btn {
    width: auto !important;
    padding: 12px 28px;
    font-size: 1rem;
}

/* ============================================================
   Responsive - Tablet & Desktop
   ============================================================ */
@media (min-width: 768px) {
    .content-wrapper {
        padding: 40px 24px;
    }

    .glass-card {
        padding: 32px 28px;
        max-width: 450px;
    }

    .glass-card--dealer-login {
        max-width: 520px;
        padding: 36px 32px;
    }

    .header {
        padding: 16px 32px;
    }

    .header__logo-left {
        width: 120px;
    }

    .header__logo-right {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .glass-card--dealer-login .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .glass-card--dealer-login .form-label {
        text-align: left;
        min-width: unset;
    }

    .glass-card--dealer-login .form-error {
        padding-left: 0;
    }
}

@media (min-width: 1024px) {
    .glass-card {
        max-width: 480px;
    }

    .glass-card--dealer-login {
        max-width: 560px;
    }

    .header {
        padding: 16px 48px;
    }
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
