/* * Global responsive and overflow fixes */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body, html {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
}

/* * Material Design 3 Color System & Typography Scale */
:root {
  /* Primary Automotive Industry Color Scheme */
  --primary-green: #2E7D32;        /* Environmental consciousness */
  --primary-blue: #1565C0;         /* Trust, reliability */
  --accent-orange: #FF8F00;        /* Cash, value, attention */

  /* Secondary Colors */
  --success-green: #4CAF50;        /* Positive outcomes */
  --warning-amber: #FFC107;        /* Caution, attention */
  --error-red: #F44336;           /* Errors, urgency */

  /* Neutral Colors */
  --surface-white: #FFFFFF;
  --surface-light: #F8F9FA;
  --surface-medium: #E9ECEF;
  --surface-dark: #495057;
  --text-primary: #212529;
  --text-secondary: #6C757D;

  /* Canadian Brand Colors */
  --canada-red: #FF0000;
  --canada-accent: #FFD700;        /* Maple leaf gold */

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Border Radius Scale */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  /* * Theme Colors - Dark Mode Default */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f0f1a;
  --card-bg: #1e1e3f;
  --input-bg: #252545;
  --border-color: #333355;
  --text-on-dark: #ffffff;
  --text-muted: #aaaacc;
  --modal-overlay: rgba(0, 0, 0, 0.7);
}

/* * Light Theme Override */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e8e8e8;
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --border-color: #dddddd;
  --text-on-dark: #333333;
  --text-muted: #666666;
  --modal-overlay: rgba(0, 0, 0, 0.5);
  --surface-white: #FFFFFF;
  --surface-light: #F8F9FA;
  --text-primary: #212529;
  --text-secondary: #6C757D;
}

/* * ==========================================
 * * NEOBRUTALISM DESIGN SYSTEM
 * * Automotive Theme Variables
 * * ==========================================
 */

:root {
    /* Theme colors (set dynamically by ThemeManager.js) */
    --neo-primary: #00329C;
    --neo-secondary: #D4DF05;
    --neo-accent: #E4000E;
    --neo-bg: #E0EAF2;
    --neo-surface: #B3C8DB;
    --neo-text: #2B3C50;
    --neo-border: #0f1216;

    /* Neobrutalism Design Tokens */
    --neo-border-width: 3px;
    --neo-border-thick: 4px;
    --neo-shadow: 4px 4px 0px var(--neo-border);
    --neo-shadow-sm: 2px 2px 0px var(--neo-border);
    --neo-shadow-lg: 6px 6px 0px var(--neo-border);
    --neo-shadow-xl: 8px 8px 0px var(--neo-border);
    --neo-shadow-hover: 6px 6px 0px var(--neo-border);
    --neo-shadow-active: 2px 2px 0px var(--neo-border);
    --neo-shadow-inset: inset 2px 2px 0px rgba(0,0,0,0.05);
    --neo-radius: 4px;
    --neo-radius-none: 0px;
    --neo-transition: 0.1s ease;
    --neo-font-weight: 800;
    --neo-font-weight-normal: 600;

    /* Text Stroke for visibility on any background - WHITE strokes only */
    --neo-text-stroke:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
    --neo-text-stroke-sm:
        -0.5px -0.5px 0 #fff,
         0.5px -0.5px 0 #fff,
        -0.5px  0.5px 0 #fff,
         0.5px  0.5px 0 #fff;
    --neo-text-stroke-xs:
        -0.3px -0.3px 0 #fff,
         0.3px -0.3px 0 #fff,
        -0.3px  0.3px 0 #fff,
         0.3px  0.3px 0 #fff;
}

/* * ==========================================
 * * NEOBRUTALISM KEYFRAME ANIMATIONS
 * * ==========================================
 */

@keyframes neo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes neo-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px) rotate(-1deg); }
    40% { transform: translateX(3px) rotate(1deg); }
    60% { transform: translateX(-2px) rotate(-0.5deg); }
    80% { transform: translateX(2px) rotate(0.5deg); }
}

@keyframes neo-pulse {
    0%, 100% {
        box-shadow: var(--neo-shadow);
        transform: scale(1);
    }
    50% {
        box-shadow: var(--neo-shadow-lg);
        transform: scale(1.02);
    }
}

@keyframes neo-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

@keyframes neo-pop {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes neo-slide-up {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes neo-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes neo-glow {
    0%, 100% {
        box-shadow: var(--neo-shadow), 0 0 0 0 var(--neo-primary);
    }
    50% {
        box-shadow: var(--neo-shadow), 0 0 0 4px var(--neo-primary);
    }
}

@keyframes neo-progress-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* * Marquee animation for theme selector */
@keyframes neo-marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes neo-marquee2 {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Text stroke utility class */
.neo-text-stroke {
    text-shadow: var(--neo-text-stroke);
}

.neo-text-stroke-sm {
    text-shadow: var(--neo-text-stroke-sm);
}

/* * Global heading styles */
h3, h4 {
    color: #000;
    text-shadow: none;
}

/* Photo cycling text - plain black */
#photo-cycling-text,
#cycling-help-text {
    color: #000;
    text-shadow: none;
}

/* Animation utility classes */
.neo-animate-bounce:hover {
    animation: neo-bounce 0.4s ease;
}

.neo-animate-shake:hover {
    animation: neo-shake 0.4s ease;
}

.neo-animate-pulse {
    animation: neo-pulse 2s ease-in-out infinite;
}

.neo-animate-wiggle:hover {
    animation: neo-wiggle 0.3s ease;
}

.neo-animate-pop {
    animation: neo-pop 0.3s ease-out;
}

.neo-animate-slide-up {
    animation: neo-slide-up 0.3s ease-out;
}

/* * ==========================================
 * * Theme Grid Selector (Settings Modal)
 * * ==========================================
 */

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 8px 0;
}

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: var(--neo-bg);
    border: var(--neo-border-width) solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow);
    cursor: pointer;
    transition: transform var(--neo-transition), box-shadow var(--neo-transition);
    font-family: var(--font-system);
}

.theme-swatch:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow-hover);
}

.theme-swatch:active {
    transform: translate(2px, 2px);
    box-shadow: var(--neo-shadow-active);
}

.theme-swatch.active {
    background: var(--neo-primary);
    color: white;
    text-shadow: none;
    animation: neo-pop 0.3s ease-out;
}

.swatch-colors {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.swatch-colors span {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neo-border);
    border-radius: 2px;
}

.swatch-name {
    font-size: 10px;
    font-weight: var(--neo-font-weight);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
}

/* * Theme grid for quote step */
.quote-theme-section {
    margin-top: var(--space-sm);
    padding-top: var(--space-xs);
    border-top: none;
}

.quote-theme-title {
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--neo-text);
    font-size: var(--text-lg);
    text-shadow: var(--neo-text-stroke-xs);
    animation: theme-title-pulse 2s ease-in-out infinite;
    cursor: pointer;
}

/* Attention-grabbing animations for theme title */
@keyframes theme-title-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

@keyframes theme-title-glow {
    0%, 100% {
        text-shadow:
            -0.3px -0.3px 0 #fff,
             0.3px -0.3px 0 #fff,
            -0.3px  0.3px 0 #fff,
             0.3px  0.3px 0 #fff,
            0 0 10px var(--neo-primary);
    }
    50% {
        text-shadow:
            -0.3px -0.3px 0 #fff,
             0.3px -0.3px 0 #fff,
            -0.3px  0.3px 0 #fff,
             0.3px  0.3px 0 #fff,
            0 0 20px var(--neo-primary),
            0 0 30px var(--neo-accent);
    }
}

@keyframes theme-title-rainbow {
    0% { color: #ff6b6b; }
    16% { color: #ffa502; }
    33% { color: #2ed573; }
    50% { color: #1e90ff; }
    66% { color: #a55eea; }
    83% { color: #ff4757; }
    100% { color: #ff6b6b; }
}

@keyframes theme-title-bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-3px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-2px); }
}

.quote-theme-title.animate-glow {
    animation: theme-title-glow 1.5s ease-in-out infinite;
}

.quote-theme-title.animate-rainbow {
    animation: theme-title-rainbow 3s linear infinite, theme-title-bounce 0.8s ease-in-out infinite;
}

.quote-theme-title.animate-bounce {
    animation: theme-title-bounce 0.6s ease-in-out infinite;
}

/* Theme grid - simple 3-column layout */
.theme-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.theme-grid .theme-swatch {
    flex: 1;
    max-width: 120px;
    min-width: 75px;
    padding: var(--space-sm);
}

@keyframes gradientBG {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

@keyframes gradientMove {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

@keyframes priceGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 143, 0, 0.6); }
    50% { text-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(255, 143, 0, 1); }
}

/* * Neobrutalism Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neo-primary);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.splash-content {
    text-align: center;
    color: white;
    position: relative;
    padding: 30px;
    border-radius: var(--neo-radius);
    background: var(--neo-bg);
    border: var(--neo-border-thick) solid var(--neo-border);
    box-shadow: var(--neo-shadow-xl);
}

.splash-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) solid var(--neo-border);
    box-shadow: var(--neo-shadow);
}

/* * Neobrutalism Splash Slogan */
.splash-slogan {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: var(--neo-font-weight);
    font-family: var(--font-system);
    margin: 0 0 var(--space-xl) 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 15px 25px;
    color: var(--neo-text);
    background: var(--neo-secondary);
    border: var(--neo-border-width) solid var(--neo-border);
    box-shadow: var(--neo-shadow);
    /* White stroke for legibility on all backgrounds */
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
}

/* Slogan pulse animation */
@keyframes sloganPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Gradient cycle animation for brand colors */
@keyframes gradientCycle {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Gradient shift animation for splash content background */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* * Welcome Screen Styles */
/* * Neobrutalism Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neo-secondary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.welcome-content {
    text-align: center;
    color: var(--neo-text);
    background: var(--neo-bg);
    padding: 30px 25px;
    border-radius: var(--neo-radius);
    border: var(--neo-border-thick) solid var(--neo-border);
    box-shadow: var(--neo-shadow-xl);
    width: 90%;
    max-width: 380px;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) solid var(--neo-border);
    box-shadow: var(--neo-shadow);
}

.welcome-benefits {
    font-size: 1.4rem;
    font-weight: var(--neo-font-weight-normal);
    margin: 25px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neo-text);
    opacity: 0;
    animation: welcomeFadeIn 1s ease-in-out forwards;
}

.welcome-cta {
    background: var(--neo-secondary);
    color: var(--neo-border);
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: var(--neo-font-weight);
    border-radius: var(--neo-radius);
    cursor: pointer;
    transition: all var(--neo-transition);
    border: var(--neo-border-thick) solid var(--neo-border);
    box-shadow: var(--neo-shadow);
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.welcome-cta:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow-hover);
}

.welcome-cta:active {
    transform: translate(2px, 2px);
    box-shadow: var(--neo-shadow-active);
}

/* * Splash and Welcome Animations */
@keyframes splashPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
    }
}

@keyframes splashGlow {
    0%, 100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

@keyframes welcomeFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* * Splash/Welcome Screen Fade Out */
.splash-screen.fade-out,
.welcome-screen.fade-out {
    animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* * Neobrutalism Body */
body {
    font-family: var(--font-system);
    line-height: 1.1;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: var(--neo-text);
    background: var(--neo-primary);
    overflow-x: hidden;
    overflow-y: auto;
}

/* * Neobrutalism App Container */
#app {
    background: var(--neo-bg);
    padding: var(--space-xl);
    border-radius: var(--neo-radius);
    border: var(--neo-border-thick) solid var(--neo-border);
    box-shadow: var(--neo-shadow-xl);
    text-align: center;
    max-width: 600px;
    width: 90%;
    margin: auto;
}

h1 {
    color: var(--neo-text);
    font-family: var(--font-system);
    font-size: var(--text-2xl);
    font-weight: var(--neo-font-weight);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

/* * Neobrutalism Inputs */
input, button {
    margin: var(--space-md) 0;
    padding: var(--space-md);
    font-size: 1rem;
    font-family: var(--font-system);
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) solid var(--neo-border);
    font-weight: var(--neo-font-weight-normal);
    transition: box-shadow var(--neo-transition);
    min-height: 44px;
}

input {
    background: var(--neo-bg);
    color: var(--neo-text);
    box-shadow: var(--neo-shadow-inset);
}

input:focus, select:focus, textarea:focus {
    outline: 3px solid var(--neo-accent);
    outline-offset: 0;
}

input::placeholder {
    color: var(--neo-text);
    opacity: 0.5;
}

/* * Neobrutalism Buttons */
button {
    cursor: pointer;
    color: white;
    background: var(--neo-primary);
    border: var(--neo-border-width) solid var(--neo-border);
    border-radius: var(--neo-radius);
    font-weight: var(--neo-font-weight);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--neo-shadow);
    transition: transform var(--neo-transition), box-shadow var(--neo-transition);
    /* White text - no stroke needed */
    text-shadow: none;
}

button:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow-hover);
    animation: neo-wiggle 0.3s ease;
}

button:active {
    transform: translate(2px, 2px);
    box-shadow: var(--neo-shadow-active);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--neo-shadow-sm);
    animation: none;
}

button.secondary {
    background: var(--neo-surface);
    text-shadow: none; /* Dark text doesn't need stroke */
    color: var(--neo-text);
}

button.accent {
    background: var(--neo-accent);
}

/* CTA (Call-to-Action) buttons with attention-grabbing animation */
button.neo-cta,
.wizard-buttons button:not(.wizard-back-btn) {
    animation: neo-glow 2s ease-in-out infinite;
    position: relative;
}

button.neo-cta:hover,
.wizard-buttons button:not(.wizard-back-btn):hover {
    animation: neo-wiggle 0.3s ease, neo-glow 2s ease-in-out infinite;
}

/* Wizard back button - secondary style */
.wizard-back-btn {
    background: var(--neo-surface) !important;
    color: var(--neo-text) !important;
    border: var(--neo-border-width) solid var(--neo-border) !important;
    text-shadow: none !important;
    animation: none !important;
}

.wizard-back-btn:hover {
    background: var(--neo-bg) !important;
}

@keyframes gradientMove {
    0% {background-position: 0% 50%;}
    100% {background-position: 100% 50%;}
}

#loading {
    margin-top: 20px;
    font-style: italic;
    font-size: 18px;
}

/* * Neobrutalism Quote Result */
#quote-result {
    display: block;
    visibility: visible;
    transition: transform var(--neo-transition);
    text-align: center;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* ! IMPROVED: White background for better text contrast */
    background: #ffffff;
    border: var(--neo-border-thick) solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow-lg);
    padding: var(--space-xl);
}

/* * Quote Result Title - High contrast black text */
#quote-result h2 {
    font-size: var(--text-3xl);
    font-weight: var(--neo-font-weight);
    color: #000000;
    margin: 0 0 var(--space-md) 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* * Quote Result Subtitle - Clear vehicle description */
#quote-result > p:first-of-type {
    font-size: var(--text-lg);
    font-weight: var(--neo-font-weight-normal);
    color: #333333;
    margin: var(--space-md) 0;
}

/* * Hide quote-result when empty (no black line) */
#quote-result:empty {
    display: none !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Vehicle form transition styles */
#vehicle-form {
    will-change: transform, opacity;
    backface-visibility: hidden;
    padding-top: 15px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* * Vehicle Form Title */
.vehicle-form-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--neo-text);
    font-size: var(--text-2xl);
    font-weight: var(--neo-font-weight);
    text-shadow:
        -0.5px -0.5px 0 #fff,
         0.5px -0.5px 0 #fff,
        -0.5px  0.5px 0 #fff,
         0.5px  0.5px 0 #fff;
}

/* * Vehicle Year/Make/Model Selectors */
.vehicle-selectors {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.selector-group label {
    font-weight: 600;
    color: var(--neo-text);
    font-size: var(--text-sm);
    text-shadow: var(--neo-text-stroke-xs);
}

.neo-select,
.neo-input {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--text-base);
    font-family: var(--font-system);
    color: var(--neo-text);
    background: var(--neo-background);
    border: 2px solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow-sm);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.neo-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='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.neo-select:disabled,
.neo-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--neo-surface);
}

.neo-select:focus,
.neo-input:focus {
    outline: none;
    border-color: var(--neo-primary);
    box-shadow: var(--neo-shadow), 0 0 0 3px rgba(var(--neo-primary-rgb, 0, 50, 156), 0.2);
}

.neo-select:hover:not(:disabled),
.neo-input:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--neo-shadow);
}

/* Mobile optimization for selectors */
@media (max-width: 480px) {
    .vehicle-selectors {
        gap: var(--space-sm);
    }

    .neo-select,
    .neo-input {
        padding: var(--space-sm) var(--space-md);
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* Theme grid mobile adjustments */
    .theme-grid {
        gap: var(--space-sm);
        padding: var(--space-xs) 0;
    }

    .theme-grid .theme-swatch {
        min-width: 75px;
        padding: var(--space-xs);
    }
}

#quote-result.docked {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    min-width: 320px;
    height: auto;
    min-height: 65px;
    /* ! FIXED: Apply gradient directly to container, remove padding */
    background: linear-gradient(135deg, var(--neo-primary), var(--neo-accent));
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow);
    cursor: pointer;
    margin: 15px auto 25px auto;
    overflow: visible;
    padding: 0; /* Remove padding so child fills completely */
    flex-shrink: 0; /* ! Prevent shrinking in flex container when wizard content is tall */
}

.quote-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 65px;
    padding: 12px 24px;
    box-sizing: border-box;
    /* Background inherited from parent #quote-result.docked */
    background: transparent;
    text-align: center;
    animation: quote-glow-pulse 2s ease-in-out infinite;
}

.quote-price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 280px;
}

.price-range {
    font-size: 28px;
    font-weight: 900;
    font-family: var(--font-mono);
    color: #fff;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.3),
        0 0 20px rgba(255,255,255,0.3);
    animation: price-bounce 0.6s ease-out;
    white-space: nowrap;
    flex-shrink: 0;
}

.currency-badge {
    font-size: 14px;
    font-weight: 800;
    background: #fff;
    color: var(--neo-primary);
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.vehicle-mini {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-align: center;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expand-chevron {
    font-size: 14px;
    color: #fff;
    margin-left: 10px;
    animation: chevron-bounce 1s ease-in-out infinite;
}

/* Quote display animations */
@keyframes quote-glow-pulse {
    0%, 100% {
        box-shadow:
            var(--neo-shadow),
            0 0 15px rgba(var(--neo-primary-rgb, 33, 150, 243), 0.3);
    }
    50% {
        box-shadow:
            var(--neo-shadow),
            0 0 25px rgba(var(--neo-primary-rgb, 33, 150, 243), 0.5);
    }
}

@keyframes price-bounce {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes chevron-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Flatpickr calendar customizations */
.flatpickr-months {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
}

.flatpickr-monthDropdown-months {
    background: var(--primary-blue) !important;
    color: white !important;
    border: none !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
}

.flatpickr-monthDropdown-months:focus {
    background: var(--primary-blue) !important;
    outline: none !important;
}

.flatpickr-month {
    display: flex !important;
    align-items: center !important;
    height: 48px !important;
}

.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-size: 14px !important;
    font-weight: 500 !important;
}

.quote-mini {
    cursor: pointer;
}

/* No longer need top margin since using sticky positioning */

/* Mobile adjustments for quote mini */
@media screen and (max-width: 480px) {
    #quote-result.docked {
        height: 55px;
        margin: 5px auto;
    }
    
    .price-range {
        font-size: 20px;
    }
    
    .vehicle-mini {
        font-size: 11px;
        font-weight: 600;
        color: #666;
        max-width: 200px;
    }
    
    .expand-chevron {
        font-size: 10px;
        margin-left: 6px;
    }
}

/* ! When collapsed AND docked, keep the gradient from .docked */
#quote-result.collapsed {
    padding: 0;
    margin-bottom: var(--space-lg);
    /* Background inherited from .docked state */
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
}

.quote-collapsed {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: var(--space-sm);
}

.quote-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.vehicle-info {
    font-weight: 700;
    color: var(--text-primary);
    font-size: var(--text-xl);
}

.quote-range {
    font-weight: 700;
    color: var(--primary-green);
    font-size: var(--text-xl);
}

.expand-quote-btn, .collapse-quote-btn {
    background: var(--primary-blue) !important;
    color: white !important;
    border: none !important;
    padding: var(--space-xs) var(--space-md) !important;
    border-radius: var(--radius-sm) !important;
    font-size: var(--text-sm) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: auto !important;
    width: auto !important;
}

.expand-quote-btn:hover, .collapse-quote-btn:hover {
    background: var(--primary-green) !important;
    transform: translateY(-1px) !important;
}

#quote-result p {
    font-size: 1.4rem;
    margin-bottom: 15px;
    margin-top: 30px;
    font-weight: bold;
}

.quote-amount, #quote-result .quote-amount {
    font-size: var(--text-4xl);
    font-weight: var(--neo-font-weight);
    font-family: var(--font-system);
    color: #000000;
    display: block;
    margin: var(--space-lg) 0;
    /* ! IMPROVED: Removed heavy text-shadow for cleaner look */
}

@keyframes neo-quote-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 1; }
}

@keyframes pulse {
    0% {transform: scale(1);}
    50% {transform: scale(1.05);}
    100% {transform: scale(1);}
}

#wizard-step {
    margin-bottom: 20px;
    margin-top: 20px;
    transition: opacity 0.3s ease-in-out;
    min-height: 200px;
    position: relative;
}

/* Wizard container for stable layout during transitions */
#wizard {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* Prevent layout shifts during step transitions */
.wizard-step-container {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

#wizard-step input {
    margin-top: 10px;
}

/* * Neobrutalism Select Elements */
select, .select-wrapper select {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--text-lg);
    font-family: var(--font-system);
    font-weight: var(--neo-font-weight-normal);
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) solid var(--neo-border);
    background-color: var(--neo-bg);
    color: var(--neo-text);
    margin-top: var(--space-md);
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%230f1216' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) top 50%;
    cursor: pointer;
    box-shadow: var(--neo-shadow-inset);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
}

@keyframes slideUp {
    from {opacity: 1; transform: translateY(0);}
    to {opacity: 0; transform: translateY(-20px);}
}

.hide-form {
    animation: slideUp 0.5s forwards;
}

.example-text {
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 5px;
}

.note-text {
    font-size: 0.9em;
    color: #A9A9A9;
    margin-top: 0;
}

.additional-info-note {
    font-size: 0.9em;
    color: #A9A9A9;
    margin-top: 5px;
}

/* * Error handling styles for local database failures */
.error-message {
    background-color: #ffebee;
    border: 2px solid #f44336;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    color: #c62828;
}

.error-message h3 {
    color: #c62828;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-message p {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.error-message button {
    background: linear-gradient(-90deg, #f44336, #d32f2f);
    margin-top: 15px;
    font-size: 1.2rem;
    padding: 12px 25px;
    width: auto;
    min-width: 150px;
}

/* * Model selection interface styles */
.model-selection {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    max-width: 100%;
    box-sizing: border-box;
}

.model-selection h3 {
    color: #1976d2;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.model-selection p {
    color: #1565c0;
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.3;
}

.model-select {
    background-color: #ffffff;
    border: 2px solid #2196f3;
    color: #1976d2;
    font-weight: bold;
    margin-bottom: 15px;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.model-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
    outline: none;
}

.confirm-selection-btn {
    background: linear-gradient(-90deg, #4caf50, #45a049);
    color: white;
    font-size: 1.2rem;
    padding: 12px 25px;
    width: auto;
    min-width: 180px;
    margin-top: 10px;
}

.confirm-selection-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.confirm-selection-btn:hover:not(:disabled) {
    background: linear-gradient(-90deg, #45a049, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* * Quote Cooldown Message Styles */
.cooldown-message {
    background: linear-gradient(135deg, #fafafa, #f0f0f0);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cooldown-message h3 {
    color: #A9A9A9;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.cooldown-message p {
    color: #888;
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.cooldown-message strong {
    color: #A9A9A9;
    font-size: 0.95rem;
    display: inline;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.cooldown-ok-btn {
    background: #f0f0f0;
    color: #A9A9A9;
    border: 1px solid #ddd;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.cooldown-ok-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.cooldown-ok-btn:active {
    background: #ddd;
}

/* * Removed intrusive cooldown animation for better UX */

/* * Disabled button styles during cooldown */
button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #cccccc !important;
    transform: none !important;
    box-shadow: none !important;
}

/* * Neobrutalism Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    animation: modalFadeIn 0.2s ease-out;
}

.modal-container {
    background: var(--neo-bg);
    border-radius: var(--neo-radius);
    border: var(--neo-border-thick) solid var(--neo-border);
    box-shadow: var(--neo-shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.2s ease-out;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--neo-primary);
    color: white;
    border-bottom: var(--neo-border-width) solid var(--neo-border);
}

.modal-header h3,
#modal-title,
.modal-title {
    margin: 0;
    color: white;
    font-size: var(--text-xl);
    font-weight: 600;
    font-family: var(--font-system);
    text-align: center;
    flex: 1;
    text-shadow: none;
}

.modal-close,
#modal-close-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover,
#modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-body p {
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    font-size: var(--text-lg);
    font-family: var(--font-system);
    line-height: 1.5;
    text-align: center;
}

.modal-select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    font-family: var(--font-system);
    background-color: var(--surface-white);
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: var(--space-lg);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg width="14" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L13 1" stroke="%231565C0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right var(--space-md) top 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
}

.modal-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
    outline: none;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#modal-confirm,
.modal-confirm-btn {
    display: block;
    margin: 0 auto;
    text-align: center;
}

.modal-confirm-btn,
.modal-cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    flex: 1;
    max-width: 200px;
}

.modal-confirm-btn {
    background: linear-gradient(-90deg, #4caf50, #45a049);
    color: white;
}

.modal-confirm-btn:hover:not(:disabled) {
    background: linear-gradient(-90deg, #45a049, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.modal-confirm-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.modal-cancel-btn {
    background: linear-gradient(-90deg, #f44336, #d32f2f);
    color: white;
}

.modal-cancel-btn:hover {
    background: linear-gradient(-90deg, #d32f2f, #f44336);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* * Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

/* * Animation classes for modal close */
.modal-overlay.closing {
    animation: modalFadeOut 0.3s ease-out forwards !important;
}

.modal-overlay.closing .modal-container {
    animation: modalSlideOut 0.3s ease-out forwards !important;
}

/* * Model Selection Modal - Specific Fixes */
#model-selection-modal .modal-container {
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

#model-selection-modal .modal-header {
    padding: 12px 16px;
    flex-shrink: 0;
}

#model-selection-modal .modal-header h3 {
    font-size: 1.1rem;
}

#model-selection-modal .modal-body {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
}

#model-selection-modal .modal-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 16px;
    padding-bottom: 8px;
}

#model-selection-modal .modal-buttons button {
    flex: 1;
    padding: 12px 16px;
    min-height: 44px;
    width: auto;
}

#model-selection-modal #modal-cancel {
    display: block;
    width: 100%;
    visibility: visible;
}

/* * Mobile-First Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-container {
        max-height: 90vh;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 15px 20px 10px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .modal-select {
        padding: 12px;
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .modal-buttons {
        gap: 10px;
    }
    
    .modal-confirm-btn,
    .modal-cancel-btn {
        width: 100%;
        max-width: none;
        flex: none;
        font-size: 1rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 5px;
    }
    
    .modal-container {
        border-radius: 8px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 12px 15px 8px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-close {
        font-size: 1.8rem;
        width: 28px;
        height: 28px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-select {
        padding: 10px;
        font-size: 0.95rem;
    }
}

/* * Flatpickr Material Design Automotive Customizations */
.flatpickr-calendar {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 30px rgba(21, 101, 192, 0.3) !important;
    font-family: var(--font-system) !important;
    background: #1a1a2e !important;
    border: 1px solid #333355 !important;
}

.flatpickr-months {
    background: #16213e !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.flatpickr-month {
    color: white !important;
    fill: white !important;
}

.flatpickr-current-month {
    color: white !important;
}

.flatpickr-current-month input.cur-year {
    color: white !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    fill: white !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: var(--accent-orange) !important;
}

.flatpickr-weekdays {
    background: #16213e !important;
}

.flatpickr-weekday {
    color: #aaaacc !important;
    font-weight: 600 !important;
}

.flatpickr-days {
    background: #1a1a2e !important;
}

.flatpickr-day {
    color: white !important;
    border-radius: 8px !important;
}

.flatpickr-day:hover {
    background: var(--accent-orange) !important;
    border-color: var(--accent-orange) !important;
    color: white !important;
}

.flatpickr-day.selected {
    background: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    color: white !important;
}

.flatpickr-day.today {
    border-color: var(--accent-orange) !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #666688 !important;
}

.flatpickr-day.flatpickr-disabled {
    color: #444466 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #252545 !important;
    color: white !important;
    border: 1px solid #333355 !important;
}

.flatpickr-monthDropdown-month {
    background: #252545 !important;
    color: white !important;
}

.flatpickr-monthDropdown-month:hover {
    background: #333355 !important;
}

.flatpickr-time {
    background: #16213e !important;
    border-top: 1px solid #333355 !important;
}

.flatpickr-time input {
    color: white !important;
    background: #252545 !important;
    border: 1px solid #333355 !important;
    border-radius: 6px !important;
    font-family: var(--font-system) !important;
}

.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-am-pm {
    color: white !important;
}

.flatpickr-time .flatpickr-am-pm {
    background: #252545 !important;
    border: 1px solid #333355 !important;
    border-radius: 6px !important;
}

.flatpickr-time .flatpickr-am-pm:hover {
    background: var(--primary-green) !important;
}

.numInputWrapper span {
    border-color: #333355 !important;
}

.numInputWrapper span:hover {
    background: var(--primary-green) !important;
}

.numInputWrapper span svg path {
    fill: white !important;
}

/* * Touch-friendly styles for mobile devices */
@media (hover: none) and (pointer: coarse) {
    .modal-close:hover {
        background-color: transparent;
        color: white;
        transform: none;
    }
    
    .modal-close:active {
        background-color: #f44336;
        color: white;
        transform: scale(0.95);
    }
    
    .modal-confirm-btn:hover:not(:disabled) {
        background: linear-gradient(-90deg, #4caf50, #45a049);
        transform: none;
        box-shadow: none;
    }
    
    .modal-confirm-btn:active:not(:disabled) {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
    }
    
    .modal-cancel-btn:hover {
        background: linear-gradient(-90deg, #f44336, #d32f2f);
        transform: none;
        box-shadow: none;
    }
    
    .modal-cancel-btn:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
    }
    
    .modal-select:focus {
        transform: none;
    }
    
    .modal-select:active {
        transform: scale(0.99);
    }
}

/* * Canadian Phone Number Validation Styles */
.validation-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.validation-success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 2px solid #4caf50;
    animation: validationSuccess 0.5s ease;
}

.validation-error {
    background-color: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
    animation: validationError 0.5s ease;
}

.validation-info {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 2px solid #2196f3;
}

.phone-help-text {
    font-size: 0.85rem;
    color: #ffffff;
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}

/* * Phone input state styles */
input.phone-valid {
    border-color: #4caf50 !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    background-color: #f8fff8;
}

input.phone-invalid {
    border-color: #f44336 !important;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.3);
    background-color: #fffbfb;
}

/* * Phone input formatting styles */
input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-align: center;
}

/* * Validation animations */
@keyframes validationSuccess {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    50% {
        transform: translateY(0) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes validationError {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    25% {
        transform: translateX(5px);
    }
    50% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* * Mobile-specific phone input styles */
@media (max-width: 768px) {
    input[type="tel"] {
        font-size: 1.5rem;
        padding: 18px;
        letter-spacing: 0.5px;
    }
    
    .validation-message {
        font-size: 0.85rem;
        padding: 6px 10px;
        margin-top: 6px;
    }
    
    .phone-help-text {
        font-size: 0.8rem;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    input[type="tel"] {
        font-size: 1.3rem;
        padding: 15px;
    }
    
    .validation-message {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .phone-help-text {
        font-size: 0.75rem;
    }
}

/* * Enhanced Mobile Optimization */
@media (max-width: 768px) {
    :root {
        --space-xl: 24px;
        --text-3xl: 1.75rem;
    }
    
    .splash-icon {
        width: 100px;
        height: 100px;
        margin-bottom: var(--space-lg);
    }
    
    .splash-slogan {
        font-size: var(--text-3xl);
        margin: 0 0 var(--space-lg) 0;
        padding: 0 var(--space-lg);
    }
    
    input, button, select {
        font-size: var(--text-base);
        padding: var(--space-lg);
        min-height: 48px;
    }
    
    
    .welcome-content {
        padding: 30px 25px;
        max-width: 350px;
        margin: 0 15px;
    }
    
    .welcome-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .welcome-benefits {
        font-size: 1.2rem;
        margin: 20px 0;
        min-height: 50px;
    }
    
    .welcome-cta {
        font-size: 1.1rem;
        padding: 12px 25px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 20px;
        --space-lg: 16px;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }
    
    #app {
        padding: var(--space-lg);
        width: 95%;
    }
    
    .splash-icon {
        width: 80px;
        height: 80px;
        margin-bottom: var(--space-lg);
    }
    
    .splash-slogan {
        font-size: var(--text-3xl);
        margin: 0 0 var(--space-lg) 0;
        padding: 0 var(--space-md);
    }
    
    input, button, select {
        font-size: var(--text-sm);
        padding: var(--space-md);
        min-height: 52px;
    }
    
    
    .welcome-content {
        padding: 25px 20px;
        max-width: 320px;
        margin: 0 20px;
    }
    
    .welcome-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .welcome-benefits {
        font-size: 1.1rem;
        margin: 15px 0;
        min-height: 45px;
        line-height: 1.3;
    }
    
    .welcome-cta {
        font-size: 1rem;
        padding: 12px 20px;
        min-width: 160px;
    }
    
    .cooldown-message {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .cooldown-message h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .cooldown-message p {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .cooldown-message strong {
        font-size: 1.1rem;
        padding: 8px;
        margin: 12px 0;
    }
    
    .cooldown-ok-btn {
        font-size: 1rem;
        padding: 10px 25px;
    }
}

/* * High contrast mode support for accessibility */
@media (prefers-contrast: high) {
    .validation-success {
        background-color: #ffffff;
        color: #000000;
        border-color: #000000;
    }
    
    .validation-error {
        background-color: #ffffff;
        color: #000000;
        border-color: #000000;
    }
    
    .validation-info {
        background-color: #ffffff;
        color: #000000;
        border-color: #000000;
    }
    
    input.phone-valid {
        border-color: #000000 !important;
        box-shadow: none;
        background-color: #ffffff;
    }
    
    input.phone-invalid {
        border-color: #000000 !important;
        box-shadow: none;
        background-color: #ffffff;
    }
    
    .splash-screen,
    .welcome-screen {
        background: #000000 !important;
    }
    
    .splash-slogan,
    .welcome-benefits,
    .welcome-cta {
        color: #ffffff !important;
    }
}

/* * Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    .validation-message {
        animation: none;
        transition: none;
    }
    
    input.phone-valid,
    input.phone-invalid {
        transition: none;
    }
    
    @keyframes validationSuccess {
        0%, 100% {
            opacity: 1;
            transform: none;
        }
    }
    
    @keyframes validationError {
        0%, 100% {
            opacity: 1;
            transform: none;
        }
    }
}

/* * Enhanced Wizard Flow Styles */
#vehicle-form.hide-form,
#vehicle-form[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* * Neobrutalism Wizard Container */
.wizard-step-container {
    background: var(--neo-surface);
    border-radius: var(--neo-radius);
    padding: var(--space-lg);
    box-shadow: var(--neo-shadow);
    border: var(--neo-border-width) solid var(--neo-border);
    animation: slideInUp 0.2s ease-out;
    contain: layout;
}

.wizard-step-container h3 {
    color: var(--neo-text);
    margin-bottom: var(--space-md);
    font-size: var(--text-xl);
    font-weight: var(--neo-font-weight);
}

.location-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-base);
}

/* * Static province display (replaces dropdown after initial selection) */
.province-static-display {
    background: var(--neo-surface);
    color: var(--neo-text);
    padding: var(--space-md);
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
    font-weight: 700;
    font-size: var(--text-lg);
    text-align: center;
    text-shadow: var(--neo-text-stroke-xs);
    box-shadow: var(--neo-shadow-sm);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-description {
    color: #000;
    opacity: 1;
    text-shadow: none;
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
    text-align: center;
    line-height: 1.5;
    animation: neo-fade-in 0.3s ease-out;
}

.wizard-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.wizard-back-btn {
    background: #6c757d !important;
    color: #ffffff !important;
    border: 2px solid var(--surface-dark) !important;
    font-weight: 500 !important;
    min-width: 100px;
}

.wizard-back-btn:hover {
    background: var(--surface-dark) !important;
    color: var(--surface-white) !important;
}

/* * Location Step Styles */
.info-box {
    background: var(--neo-surface);
    border: var(--neo-border-width) solid var(--neo-border);
    border-radius: var(--neo-radius);
    padding: var(--space-md);
    margin-top: var(--space-md);
    text-align: center;
    box-shadow: var(--neo-shadow-sm);
}

.info-box p {
    margin: 0;
    color: var(--neo-text);
    font-weight: 600;
    text-shadow: var(--neo-text-stroke-xs);
}

#rate-display {
    color: var(--neo-primary);
    font-size: var(--text-lg);
    font-weight: 700;
}

/* * Condition Assessment Styles */
.condition-progress {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.condition-progress p {
    margin: 0 0 var(--space-sm) 0;
    color: var(--neo-text);
    opacity: 0.75;
    text-shadow: var(--neo-text-stroke-xs);
    font-weight: 500;
    animation: neo-fade-in 0.3s ease-out;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--neo-surface);
    border: 2px solid var(--neo-border);
    border-radius: var(--neo-radius);
    overflow: hidden;
    margin: var(--space-sm) 0;
    box-shadow: var(--neo-shadow-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--neo-primary) 0%,
        var(--neo-secondary) 25%,
        var(--neo-accent) 50%,
        var(--neo-secondary) 75%,
        var(--neo-primary) 100%
    );
    background-size: 200% 100%;
    border-radius: var(--neo-radius-none);
    transition: width 0.3s ease;
    animation: neo-progress-shimmer 2s linear infinite;
}

.condition-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
}

/* * Neobrutalism Condition Options */
.condition-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: var(--neo-border-width) solid var(--neo-border);
    border-radius: var(--neo-radius);
    cursor: pointer;
    transition: transform var(--neo-transition), box-shadow var(--neo-transition);
    background: var(--neo-bg);
    color: var(--neo-text);
    text-align: left;
    box-shadow: var(--neo-shadow-sm);
}

.condition-option:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow);
    background: var(--neo-bg);
    animation: neo-bounce 0.3s ease;
}

.condition-option.selected {
    background: var(--neo-primary);
    color: white;
    text-shadow: none;
}

.condition-option input[type="radio"],
.condition-option input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    align-self: center;
    accent-color: var(--neo-accent);
}

.condition-option.selected,
.condition-option:has(input:checked) {
    background: var(--neo-primary);
    color: white;
    box-shadow: var(--neo-shadow);
    text-shadow: none;
    animation: neo-pop 0.2s ease-out;
}

.condition-option.selected .option-text,
.condition-option:has(input:checked) .option-text {
    color: white;
    text-shadow: none;
}

.option-text {
    display: flex;
    flex-direction: column;
    font-weight: var(--neo-font-weight-normal);
    color: var(--neo-text);
    line-height: 1.4;
    text-align: left;
}

.option-main {
    display: block;
    text-align: left;
}

.option-subtext {
    display: block;
    font-size: 0.85em;
    color: var(--neo-text);
    opacity: 0.7;
    font-weight: 400;
    margin-top: 4px;
    text-align: left;
}

/* * Neobrutalism Quote Update */
.quote-update {
    background: var(--neo-secondary);
    color: var(--neo-text);
    padding: var(--space-md);
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) solid var(--neo-border);
    box-shadow: var(--neo-shadow);
    text-align: center;
    animation: quoteUpdateSlide 0.5s ease-out;
    margin-top: var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal quote update - plain black text */
#modal-quote-update,
#modal-quote-update p {
    color: #000;
    text-shadow: none;
}

.quote-update p {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 600;
}

#quote-result .quote-update .quote-amount {
    font-size: var(--text-4xl) !important;
    font-weight: 700 !important;
    color: var(--accent-orange) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    animation: none !important;
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        -2px 0 0 white,
        2px 0 0 white,
        0 -2px 0 white,
        0 2px 0 white,
        0 0 15px rgba(255, 255, 255, 1),
        0 0 25px rgba(255, 255, 255, 0.8),
        2px 2px 10px rgba(0, 0, 0, 0.7) !important;
}

.quote-range {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
}

/* * CTA text after quote display - Neobrutalism style */
.quote-cta {
    font-size: var(--text-lg);
    font-weight: var(--neo-font-weight);
    color: #000000;
    margin: var(--space-xl) 0 var(--space-lg) 0;
    text-align: center;
    background: var(--neo-accent);
    color: #ffffff;
    padding: var(--space-md) var(--space-lg);
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow-sm);
    display: inline-block;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* * Gamified bonus notification */
.bonus-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(0) scale(0.8);
    background: linear-gradient(135deg, var(--success-green), var(--primary-green));
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-2xl);
    font-weight: 700;
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
    border: 2px solid var(--success-green);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bonus-notification.big {
    font-size: var(--text-4xl);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 15px 35px rgba(46, 125, 50, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.3);
    animation: bonusPulse 0.6s ease-out;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) scale(0);
}

@keyframes bonusPulse {
    0%, 100% { transform: translateX(-50%) translateY(-50%) scale(1); }
    50% { transform: translateX(-50%) translateY(-50%) scale(1.1); }
}

.max-quote {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ! IMPROVED: High-contrast price display with pulse animation */
.base-quote {
    font-size: var(--text-4xl);
    font-weight: var(--neo-font-weight);
    color: #000000;
    background: var(--neo-secondary);
    padding: 8px 24px;
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow);
    animation: price-pulse 2s ease-in-out infinite;
}

.max-quote {
    font-size: var(--text-4xl);
    font-weight: var(--neo-font-weight);
    color: #ffffff;
    background: var(--neo-primary);
    padding: 8px 24px;
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
    box-shadow: var(--neo-shadow);
    animation: price-pulse 2s ease-in-out infinite 0.3s;
}

/* Pulse animation for price badges */
@keyframes price-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--neo-shadow);
    }
    50% {
        transform: scale(1.03);
        box-shadow: var(--neo-shadow-lg);
    }
}

.quote-separator-range {
    font-size: var(--text-xl);
    font-weight: var(--neo-font-weight);
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.currency {
    font-size: var(--text-xl);
    font-weight: var(--neo-font-weight-normal);
    color: #000000;
    margin-left: var(--space-xs);
}

/* Scrap rate info with cycling color effect for visibility */
.scrap-rate-info {
    font-size: 0.9rem;
    font-weight: var(--neo-font-weight-normal);
    margin-top: 15px;
    animation: color-cycle 3s ease-in-out infinite;
}

@keyframes color-cycle {
    0%, 100% {
        color: #000000;
    }
    50% {
        color: #ffffff;
        text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000,
            1px 1px 0 #000;
    }
}

.condition-bonuses {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.bonus-breakdown {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    opacity: 0.9;
}

.bonus-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bonus-list li {
    font-size: var(--text-sm);
    padding: var(--space-xs) 0;
    opacity: 0.9;
}

@keyframes quoteUpdateSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.condition-continue-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green)) !important;
    color: white !important;
    border: none !important;
    padding: var(--space-md) var(--space-lg) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    margin-top: var(--space-lg) !important;
    cursor: pointer !important;
    width: 100% !important;
    font-size: var(--text-lg) !important;
    transition: all 0.3s ease !important;
}

.condition-continue-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

/* * Enhanced Mobile Responsiveness for New Components */
@media (max-width: 768px) {
    .location-inputs {
        gap: var(--space-md);
    }
    
    .wizard-step-container {
        padding: var(--space-md);
    }
    
    .quote-collapsed {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-md);
    }
    
    .condition-option {
        padding: var(--space-sm);
    }
    
    .condition-option input[type="radio"] {
        width: 18px;
        height: 18px;
        min-width: 18px;
        margin-right: var(--space-sm);
    }
    
    .option-text {
        font-size: var(--text-sm);
    }
    
    .wizard-buttons {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .wizard-back-btn {
        order: 2;
    }
}

@media (max-width: 480px) {
    .condition-option {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .condition-progress p {
        font-size: var(--text-sm);
    }
    
    .quote-update {
        padding: var(--space-sm);
        margin-top: var(--space-md);
    }
    
    .quote-range {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .base-quote, .max-quote {
        font-size: var(--text-2xl);
        padding: 6px 16px;
    }
    
    .quote-update .quote-amount {
        font-size: var(--text-2xl);
    }
}

/* * Camera and Photo Capture Styles */
.photo-capture-section {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: var(--space-md) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    contain: layout style; /* Isolate reflow */
}

.camera-preview {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    background: var(--surface-dark);
}

.detection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background-color 0.15s ease;
}

/* Capture flash effect for instant visual feedback */
.capture-flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    opacity: 0.8;
    animation: flashFade 0.2s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes flashFade {
    to { opacity: 0; }
}

.vehicle-guide-frame {
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    width: 80%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
}

.guide-corners::before,
.guide-corners::after,
.vehicle-guide-frame::before,
.vehicle-guide-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--accent-orange);
}

.guide-corners::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.guide-corners::after {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
}

.vehicle-guide-frame::before {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
}

.vehicle-guide-frame::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

/* ! Guide text is now HIDDEN - all messages use #detection-status below camera */
.guide-text {
    display: none !important; /* Hide overlay - use detection-status instead */
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.7);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

/* Detection Status - Positioned BELOW camera, not as overlay */
#detection-status,
.detection-status {
    display: none; /* Hidden by default, shown via JS */
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    /* Flow-based positioning below camera */
    position: relative;
    width: 100%;
    box-sizing: border-box;
    /* ! Prevent layout jump by reserving space for text */
    min-height: 44px;
    line-height: 1.4;
}

/* Status type variations - black text, no effects */
.status-loading {
    background: rgba(255, 193, 7, 0.2);
    border: 2px solid #ffc107;
    color: #000000;
}

.status-success {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
    color: #000000;
}

.status-warning {
    background: rgba(255, 152, 0, 0.2);
    border: 2px solid #ff9800;
    color: #000000;
}

.status-error {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #000000;
}

.status-info {
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid #2196f3;
    color: #000000;
}

.status-icon {
    font-size: 18px;
}

/* Loading animation for status icon */
.status-loading .status-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Legacy overlay indicator - keep for backward compatibility */
.detection-status-overlay {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    z-index: 10;
}

.detection-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(0, 0, 0, 0.8);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.detection-status.vehicle-found .detection-indicator {
    background: rgba(76, 175, 80, 0.9);
    animation: success-glow 1s ease-out;
}

@keyframes success-glow {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.scanning-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-orange);
    border-radius: 50%;
    animation: scanning-pulse 1.5s infinite;
}

.scanning-dot.found {
    background: var(--success-green);
    animation: found-pulse 1s ease-out;
}

@keyframes scanning-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes found-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.detection-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
    font-weight: 500;
}

.camera-controls {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-md);
    z-index: 10;
}

.capture-btn,
.switch-btn,
.close-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    font-size: var(--text-2xl);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.capture-btn {
    background: linear-gradient(135deg, var(--accent-orange), #FF6F00);
    color: white;
    transform: scale(1.2);
}

.capture-btn:hover {
    transform: scale(1.3);
    box-shadow: 0 6px 20px rgba(255, 143, 0, 0.4);
}

.capture-btn:disabled {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    transform: scale(1);
    cursor: not-allowed;
}

.capture-btn.vehicle-detected {
    background: linear-gradient(135deg, var(--success-green), #388E3C);
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0%, 100% { box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(76, 175, 80, 0.7); }
}

.switch-btn,
.close-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--surface-dark);
    backdrop-filter: blur(10px);
}

.switch-btn:hover,
.close-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* * Desktop Upload Button (hidden on mobile) */
.desktop-upload-trigger {
    text-align: center;
    margin: var(--space-lg) 0 var(--space-md) 0;
}

.upload-photos-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-orange), #F57C00);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 143, 0, 0.3);
    width: 100%;
    max-width: 300px;
}

.upload-photos-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 143, 0, 0.4);
}

/* Hide desktop upload on mobile devices */
@media (max-width: 768px) {
    .desktop-upload-trigger {
        display: none;
    }
}

/* Also hide if touch device (more reliable than width alone) */
@media (hover: none) and (pointer: coarse) {
    .desktop-upload-trigger {
        display: none;
    }
}

.camera-trigger {
    text-align: center;
    margin: var(--space-lg) 0;
}

.open-camera-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    border: none;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    font-size: var(--text-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
    width: 100%;
    max-width: 300px;
}

.open-camera-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(21, 101, 192, 0.4);
}

.camera-help {
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
    animation: color-cycle 3s ease-in-out infinite;
}

/* Detection warning - appears below camera when fallback enabled */
.detection-warning {
    background: linear-gradient(135deg, rgba(255, 143, 0, 0.15), rgba(255, 152, 0, 0.1));
    border: 2px solid #FF8F00;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    text-align: center;
    color: #FF8F00;
    font-weight: 500;
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.detection-warning .warning-icon {
    font-size: 1.2em;
}

.photo-gallery {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--neo-surface);
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) dashed var(--neo-border);
}

.photo-gallery h4 {
    color: var(--neo-text);
    margin: 0 0 var(--space-md) 0;
    font-size: var(--text-lg);
    font-weight: 600;
    text-shadow: var(--neo-text-stroke-sm);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.delete-photo-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    /* ! Force perfect circle with explicit sizing */
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    padding: 0;
    margin: 0;
    border: none;
    background: rgba(244, 67, 54, 0.95);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    z-index: 10;
}

.delete-photo-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.delete-photo-btn:active {
    transform: scale(0.95);
}

.file-upload-fallback {
    text-align: center;
    padding: var(--space-lg);
    background: var(--surface-light);
    border: 2px dashed var(--surface-medium);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.file-upload-fallback h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.file-upload-fallback input[type="file"] {
    margin: var(--space-md) 0;
    padding: var(--space-sm);
    border: 1px solid var(--surface-medium);
    border-radius: var(--radius-sm);
    background: white;
}

.upload-help {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: var(--space-sm) 0 0 0;
}

/* Camera error message */
.camera-error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid #ff4444;
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
    text-align: center;
}

/* Desktop camera notice */
.desktop-camera-notice {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
    text-align: center;
}

.desktop-camera-notice strong {
    display: block;
    margin-bottom: 5px;
}

.desktop-camera-notice p {
    margin: 0;
}

/* Mobile optimizations for camera */
@media (max-width: 768px) {
    .camera-preview {
        height: 250px;
    }
    
    .camera-controls {
        bottom: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .capture-btn,
    .switch-btn,
    .close-btn {
        width: 50px;
        height: 50px;
        font-size: var(--text-lg);
    }
    
    .capture-btn {
        transform: scale(1.1);
    }
    
    .capture-btn:hover {
        transform: scale(1.2);
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: var(--space-sm);
    }
    
    .open-camera-btn {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-base);
    }
}

@media (max-width: 480px) {
    .vehicle-guide-frame {
        width: 90%;
        height: 80%;
    }
    
    .guide-text {
        font-size: var(--text-xs);
        padding: var(--space-xs);
    }
    
    .photo-gallery {
        padding: var(--space-sm);
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* Enhanced Welcome Screen Styles */
.welcome-screen {
    background: var(--surface-white);
}

.welcome-content {
    background: var(--surface-white);
}

.welcome-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: var(--space-md) 0;
    line-height: 1.3;
}

.welcome-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    text-align: center;
    margin: var(--space-md) 0 var(--space-xl) 0;
    line-height: 1.5;
    max-width: 600px;
}

.welcome-benefits {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--primary-green);
    text-align: center;
    margin: var(--space-xl) 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    line-height: 1.4;
}

.welcome-footer {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    margin: var(--space-lg) 0 0 0;
    font-weight: 500;
}

/* * Welcome Screen Name Input */
.welcome-name-section {
    margin: 25px 0;
    text-align: center;
}

.welcome-name-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.welcome-name-input {
    width: 100%;
    max-width: 250px;
    padding: 12px 20px;
    font-size: 1.5rem;
    font-family: var(--font-system);
    font-weight: 500;
    border: 2px solid var(--primary-blue);
    border-radius: 25px;
    background: white;
    color: #333333 !important;
    text-align: center;
    text-transform: capitalize;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-name-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
    transform: scale(1.02);
}

.welcome-name-input::placeholder {
    color: #A9A9A9;
    font-style: italic;
}

.welcome-name-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}

/* * Additional Info Step Styles */
.wizard-input textarea {
    width: 100%;
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-system);
    font-size: 1.5rem;
    padding: var(--space-md);
    border: 2px solid var(--surface-medium);
    border-radius: var(--radius-md);
    background: var(--surface-white);
    color: var(--text-primary);
    line-height: 1.4;
    transition: border-color 0.3s ease;
}

.wizard-input textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #A9A9A9;
    margin-top: 5px;
    font-style: italic;
}

.full-width-button.secondary {
    background: var(--surface-medium);
    color: var(--text-primary);
    border: 2px solid var(--surface-medium);
}

.full-width-button.secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary-blue);
}

.welcome-cta {
    background: var(--neo-secondary);
    color: var(--neo-border);
    border: var(--neo-border-thick) solid var(--neo-border);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--neo-radius);
    font-size: var(--text-lg);
    font-weight: var(--neo-font-weight);
    cursor: pointer;
    transition: all var(--neo-transition);
    box-shadow: var(--neo-shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 250px;
}

.welcome-cta:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow-hover);
}

.welcome-cta:active {
    transform: translate(2px, 2px);
    box-shadow: var(--neo-shadow-active);
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: var(--text-xl);
        margin: var(--space-sm) 0;
    }

    .welcome-subtitle {
        font-size: var(--text-base);
        margin: var(--space-sm) 0 var(--space-lg) 0;
    }

    .welcome-benefits {
        font-size: var(--text-base);
        margin: var(--space-lg) 0;
        min-height: 50px;
    }

    .welcome-cta {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-base);
        min-width: 200px;
    }
}

/* * ========================================== */
/* * Theme Application Styles */
/* * ========================================== */

/* * Apply theme to body and main containers */
/* * Neobrutalism Body Theme Override */
body {
    background-color: var(--neo-primary);
    color: var(--neo-text);
    transition: background-color var(--neo-transition), color var(--neo-transition);
}

/* * Neobrutalism App container theme */
#app {
    background-color: var(--neo-bg);
    color: var(--neo-text);
}

/* * Neobrutalism Card and panel theme */
.card, .wizard-step-container, .quote-result {
    background-color: var(--neo-surface);
    border-color: var(--neo-border);
    color: var(--neo-text);
}

/* * Neobrutalism Input theme */
input, select, textarea {
    background-color: var(--neo-bg);
    color: var(--neo-text);
    border-color: var(--neo-border);
}

input::placeholder, textarea::placeholder {
    color: var(--neo-text);
    opacity: 0.5;
}

/* * Override for inputs */
.wizard-step-container input,
.wizard-step-container select,
.wizard-step-container textarea,
#phone,
.welcome-name-input {
    color: var(--neo-text) !important;
}

/* * Ensure wizard inputs have proper styling */
.wizard-step-container input[type="text"],
.wizard-step-container input[type="tel"],
.wizard-step-container input[type="email"],
.wizard-step-container textarea,
.wizard-input {
    background: white !important;
    color: #333333 !important;
    border: 2px solid var(--surface-medium);
    text-align: center;
}

.wizard-step-container input::placeholder,
.wizard-step-container textarea::placeholder,
.wizard-input::placeholder {
    color: #999999 !important;
    text-align: center;
}

/* * Province Selector and Wizard Select Styling */
.wizard-step-container select,
#province-select,
/* * Neobrutalism Select */
select.form-control {
    background-color: var(--neo-bg) !important;
    color: var(--neo-text) !important;
    border: var(--neo-border-width) solid var(--neo-border);
    padding: 12px 40px 12px 14px;
    font-size: 16px;
    font-weight: var(--neo-font-weight-normal);
    width: 100%;
    border-radius: var(--neo-radius);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    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='%230f1216' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-height: 44px;
    box-shadow: var(--neo-shadow-inset);
}

.wizard-step-container select:focus,
#province-select:focus,
select.form-control:focus {
    outline: 3px solid var(--neo-accent);
    outline-offset: 0;
}

/* Dropdown options styling */
.wizard-step-container select option,
#province-select option,
select.form-control option {
    background-color: var(--neo-bg);
    color: var(--neo-text);
    padding: 10px;
}

/* * Modal theme */
.modal-overlay {
    background-color: var(--modal-overlay);
}

/* * Date/Time Picker Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal .modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 400px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal .modal-content h3 {
    color: var(--text-on-dark);
    margin-bottom: var(--space-lg);
    font-size: var(--text-xl);
}

#flatpickr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-lg) 0;
}

#flatpickr-container .flatpickr-calendar {
    margin: 0 auto;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

.modal-content {
    background-color: var(--card-bg);
    color: var(--text-on-dark);
    border-color: var(--border-color);
}

/* * ========================================== */
/* * Session Restore Modal Styles */
/* * ========================================== */

#restore-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#restore-modal .restore-modal-content {
    background: var(--neo-bg);
    border: 3px solid var(--neo-border);
    border-radius: var(--neo-radius);
    padding: 24px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: var(--neo-shadow);
}

#restore-modal .restore-modal-content h3 {
    color: var(--neo-text);
    margin: 0 0 12px 0;
    font-size: 1.4rem;
}

#restore-modal .restore-modal-content p {
    color: var(--neo-text);
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

#restore-modal .restore-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

#restore-modal .restore-modal-buttons .neo-btn {
    flex: 1;
    padding: 12px 16px;
    font-weight: 600;
}

#restore-modal .restore-modal-buttons .neo-btn-secondary {
    background: var(--neo-surface);
    color: var(--neo-text);
}

/* * ========================================== */
/* * Neobrutalism Settings Modal Styles */
/* * ========================================== */

.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.settings-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    background-color: var(--neo-bg);
    border-radius: var(--neo-radius);
    border: var(--neo-border-thick) solid var(--neo-border);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--neo-shadow-xl);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.settings-modal-overlay.active .settings-modal {
    transform: translateY(0);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: var(--neo-border-width) solid var(--neo-border);
    background: var(--neo-primary);
}

.settings-header h2 {
    margin: 0;
    font-size: var(--text-xl);
    color: white;
    font-weight: var(--neo-font-weight);
}

.settings-close-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    padding: 0;
    margin: 0;
    border-radius: var(--neo-radius);
    background-color: var(--neo-accent);
    color: #ffffff;
    border: 2px solid var(--neo-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--neo-shadow-sm);
    transition: transform var(--neo-transition), box-shadow var(--neo-transition);
}

.settings-close-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--neo-shadow);
}

.settings-content {
    padding: var(--space-lg);
}

.settings-section {
    margin-bottom: var(--space-lg);
}

.settings-section-title {
    font-size: var(--text-sm);
    font-weight: var(--neo-font-weight);
    color: var(--neo-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

/* Settings theme grid - 3 per row */
.settings-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.settings-theme-grid .theme-swatch {
    width: 100%;
    min-width: auto;
    max-width: none;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background-color: var(--neo-surface);
    border-radius: var(--neo-radius);
    border: var(--neo-border-width) solid var(--neo-border);
    margin-bottom: var(--space-sm);
    box-shadow: var(--neo-shadow-sm);
}

.settings-item-label {
    font-size: var(--text-base);
    color: var(--neo-text);
    font-weight: var(--neo-font-weight-normal);
}

.settings-item-value {
    font-size: var(--text-sm);
    color: var(--neo-text);
    opacity: 0.7;
}

/* * Neobrutalism Settings Update Button */
.settings-update-btn {
    width: auto;
    max-width: 200px;
    padding: 10px 24px;
    background-color: var(--neo-secondary);
    border: var(--neo-border-width) solid var(--neo-border);
    color: var(--neo-text);
    border-radius: var(--neo-radius);
    font-size: 14px;
    font-weight: var(--neo-font-weight);
    text-align: center;
    cursor: pointer;
    box-shadow: var(--neo-shadow-sm);
    transition: transform var(--neo-transition), box-shadow var(--neo-transition);
}

.settings-update-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow);
}

.settings-update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* * Theme Toggle Switch */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    background-color: var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.theme-toggle.active {
    background-color: var(--primary-green);
}

.theme-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.theme-toggle.active .theme-toggle-slider {
    transform: translateX(28px);
}

.settings-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background-color: var(--input-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.settings-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: var(--text-lg);
    overflow: hidden;
}

.settings-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-user-details {
    flex: 1;
}

.settings-user-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-on-dark);
    margin-bottom: 2px;
}

.settings-user-email {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.settings-signout-btn {
    width: 100%;
    padding: var(--space-md);
    background-color: var(--error-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.settings-signout-btn:hover {
    background-color: #d32f2f;
}

/* * ========================================== */
/* * My Quotes Modal Styles */
/* * ========================================== */

.my-quotes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--modal-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.my-quotes-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.my-quotes-modal {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.my-quotes-modal-overlay.active .my-quotes-modal {
    transform: translateY(0);
}

.my-quotes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.my-quotes-header h2 {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--text-on-dark);
}

.my-quotes-close-btn {
    background: var(--error-red);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    padding: 0;
    line-height: 32px;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.my-quotes-close-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.my-quotes-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.my-quotes-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.my-quotes-empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.quote-card {
    background-color: var(--input-bg);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.quote-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.quote-card-vehicle {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-on-dark);
}

.quote-card-amount {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--primary-green);
}

.quote-card-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.quote-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quote-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.quote-status-pending {
    background-color: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.quote-status-reviewed {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.quote-status-contacted {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.quote-status-completed {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.quote-status-cancelled {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.my-quotes-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
}

.my-quotes-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* * ========================================== */
/* * Photo Step Cycling Text & Alert Modal */
/* * ========================================== */

.photo-cycling-text {
    transition: opacity 0.3s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-alert-overlay.active {
    opacity: 1;
    visibility: visible;
}

.photo-alert-modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.photo-alert-overlay.active .photo-alert-modal {
    transform: translateY(0);
}

.photo-alert-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.photo-alert-modal h3 {
    color: var(--text-on-dark);
    margin-bottom: var(--space-sm);
    font-size: var(--text-xl);
}

.photo-alert-modal p {
    color: var(--text-on-dark);
    margin-bottom: var(--space-sm);
}

.photo-alert-sub {
    font-size: var(--text-sm);
    color: var(--text-muted) !important;
}

.photo-alert-btn {
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-xl);
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.photo-alert-btn:hover {
    background: #1b5e20;
}

/* * ========================================== */
/* * Comprehensive Responsive Design Fixes */
/* * ========================================== */

/* Ensure quote-result is always visible */
#quote-result {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    margin: var(--space-md) auto;
}

/* Wizard container responsive fixes */
#wizard {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: var(--space-md);
    box-sizing: border-box;
}

#wizard-step {
    width: 100%;
    max-width: 100%;
}

/* Ensure wizard step container and h3 are visible */
.wizard-step-container {
    width: 100%;
    padding: var(--space-md);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.wizard-step-container h3 {
    font-size: clamp(1rem, 4vw, 1.25rem);
    margin: 0 0 var(--space-md) 0;
    word-wrap: break-word;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

/* Ensure progress bar is visible */
.progress-bar,
.wizard-progress,
#wizard-progress {
    width: 100%;
    max-width: 100%;
    height: 10px;
    min-height: 10px;
    background: var(--neo-surface);
    border: 2px solid var(--neo-border);
    border-radius: var(--neo-radius);
    margin-bottom: var(--space-md);
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: block;
    visibility: visible;
    box-shadow: var(--neo-shadow-sm);
}

.progress-fill,
.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--neo-primary) 0%,
        var(--neo-secondary) 25%,
        var(--neo-accent) 50%,
        var(--neo-secondary) 75%,
        var(--neo-primary) 100%
    );
    background-size: 200% 100%;
    border-radius: var(--neo-radius-none);
    transition: width 0.3s ease;
    animation: neo-progress-shimmer 2s linear infinite;
}

/* Small phones (320px-360px) */
@media screen and (max-width: 360px) {
    body {
        padding: 10px;
    }

    #app {
        padding: var(--space-md);
        width: 95%;
        border-radius: var(--radius-md);
    }

    h1, h2, h3 {
        font-size: 1.1rem;
    }

    .wizard-step-container {
        padding: var(--space-sm);
    }

    .wizard-step-container h3 {
        font-size: 1rem;
    }

    #quote-result.docked {
        height: auto;
        min-height: 50px;
        padding: 0;
    }
}

/* Standard mobile (361px-480px) */
@media screen and (max-width: 480px) {
    body {
        padding: 15px;
    }

    #wizard {
        padding: var(--space-sm);
    }

    button {
        width: 100%;
        padding: 14px;
    }

    .wizard-step-container h3 {
        font-size: 1.1rem;
    }
}

/* Tablet (481px-768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    #wizard {
        max-width: 550px;
    }
}

/* Desktop (769px+) */
@media screen and (min-width: 769px) {
    body {
        padding: 40px;
    }

    #app {
        max-width: 650px;
    }

    #wizard {
        max-width: 600px;
    }
}

/* * ========================================== */
/* * Viewport Fix - Ensure elements stay visible */
/* * ========================================== */

/* Fix for quote-result with both docked and collapsed classes */
#quote-result.docked.collapsed {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: var(--space-md) auto;
    width: 100%;
    max-width: 400px;
}

/* Prevent any element from being pushed off-screen */
#app, #app-root, #wizard, #wizard-step, .wizard-step-container {
    transform: none;
    position: relative;
    overflow: visible;
}

/* Ensure app stays within viewport at 100% zoom */
#app {
    max-height: none;
    min-height: auto;
}

/* * ========================================== */
/* * h3/h4 Spacing Fixes */
/* * ========================================== */

/* Reduce spacing between h3 and h4 in wizard steps */
.wizard-step-container h3 {
    margin-bottom: 8px;
}

.wizard-step-container h4,
.wizard-step-container h3 + h4 {
    margin-top: 4px;
    margin-bottom: 12px;
    color: #000;
    text-shadow: none;
    font-size: var(--text-base);
    font-weight: 500;
}

/* Condition assessment specific spacing */
.condition-assessment h3,
.vehicle-condition-step h3 {
    margin-bottom: 6px;
}

.condition-assessment h4,
.vehicle-condition-step h4 {
    margin-top: 4px;
    margin-bottom: 10px;
}

/* * ========================================== */
/* * Skip Button Styling Fix */
/* * ========================================== */

/* Fix secondary button - ensure visibility in both light and dark modes */
.secondary,
button.secondary,
.full-width-button.secondary {
    background-color: transparent !important;
    color: var(--accent-color, #FF8F00) !important;
    border: 2px solid var(--accent-color, #FF8F00) !important;
}

.secondary:hover,
button.secondary:hover,
.full-width-button.secondary:hover {
    background-color: var(--accent-color, #FF8F00) !important;
    color: #ffffff !important;
}

/* Specific skip button fix */
#skip-info {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border: none !important;
}

#skip-info:hover {
    background-color: #5a6268 !important;
}

/* Dark mode skip button */
[data-theme="dark"] #skip-info {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

[data-theme="dark"] #skip-info:hover {
    background-color: #5a6268 !important;
}

/* ============================================
   MOBILE GRADIENT ANIMATION FIX
   ! Reduces background animation on mobile to prevent UI scaling issues
   ============================================ */

/* Reduce gradient animation intensity on mobile */
@media (max-width: 768px) {
    /* Reduce background-size for better mobile performance */
    body {
        background-size: 200% 200% !important;
    }

    /* Slow down animation on mobile to reduce GPU usage */
    body,
    .splash-screen,
    .welcome-container {
        animation-duration: 30s !important;
    }

    /* Disable animation on very small screens or low-power devices */
    @media (prefers-reduced-motion: reduce) {
        body,
        .splash-screen,
        .welcome-container,
        .get-quote-btn {
            animation: none !important;
            background-size: 100% 100% !important;
        }
    }
}

/* Fix potential overflow issues caused by large background-size */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    /* Prevent horizontal scroll from gradient animation */
    position: relative;
}

/* Ensure app container doesn't overflow */
#app {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix for iOS Safari scroll issues */
@supports (-webkit-touch-callout: none) {
    body {
        /* Simpler gradient for iOS to prevent scrolling issues */
        background-attachment: scroll !important;
    }
}

/* ============================================
   QUOTE-RESULT VIEWPORT FIX
   ! Ensures quote-result stays visible in viewport at all times
   ============================================ */

/* Override all other quote-result positioning to ensure visibility */
#quote-result {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 16px auto !important;
    width: 100% !important;
    max-width: 400px !important;
    box-sizing: border-box !important;
}

#quote-result.docked {
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    margin: 16px auto !important;
}

#quote-result.docked.collapsed {
    position: relative !important;
    transform: none !important;
    margin: 16px auto !important;
}

/* ============================================
   PWA INSTALL BANNER
   ============================================ */

.install-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s ease-out;
    border-top: 2px solid #03a9f4;
}

.install-banner.show {
    bottom: 0;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.install-icon {
    font-size: 32px;
}

.install-text {
    display: flex;
    flex-direction: column;
}

.install-text strong {
    color: #ffffff;
    font-size: 16px;
}

.install-text span {
    color: #aaa;
    font-size: 13px;
}

.install-buttons {
    display: flex;
    gap: 10px;
}

.install-btn-dismiss {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.install-btn-dismiss:hover {
    border-color: #888;
    color: #fff;
}

.install-btn-accept {
    background: linear-gradient(135deg, #21b11e, #03a9f4);
    border: none;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.install-btn-accept:hover {
    opacity: 0.9;
}

/* iOS-specific styling */
.install-banner.ios-install .install-text span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .install-banner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .install-content {
        width: 100%;
    }

    .install-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}