/*
 * BOOKING WIZARD STYLES
 * 3-Step booking flow with Mapbox integration
 * Premium black/charcoal theme with gold accents
 */

:root {
    /* Inherit core tokens so the wizard follows light/dark theme */
    --wizard-primary: var(--accent, #d4af37);
    --wizard-bg: var(--bg, #ffffff);
    --wizard-card-bg: var(--surface, #f8f9fa);
    --wizard-border: var(--border, #e0e0e0);
    --wizard-border-strong: clamp(1px, 0.35vw, 2px);
    --wizard-border-regular: clamp(1px, 0.25vw, 1.5px);
    --wizard-text: var(--text, #1a1a1a);
    --wizard-text-muted: var(--text-secondary, #4a4a4a);
    --wizard-success: var(--success, #28a745);
    --wizard-error: var(--danger, #dc3545);
    --wizard-spacing: var(--space-lg, 1.5rem);
    --wizard-radius-lg: clamp(8px, 2vw, 12px);
    --wizard-radius-md: clamp(7px, 1.6vw, 10px);
    --wizard-radius-sm: clamp(6px, 1.2vw, 8px);

    /* Unified input shell tokens (reuse site theme colors) */
    --input-bg: var(--wizard-bg);
    --input-border: var(--wizard-border);
    --input-text: var(--wizard-text);
    --input-placeholder: var(--wizard-text-muted);
    --input-focus: var(--wizard-primary);
    --input-radius: 8px;

    /* Mapbox Search JS specific tokens */
    --evl-input-bg: #333;
    --evl-input-border: #262626;
    --evl-input-text: #ffffff;
    --evl-input-radius: 12px;
    --evl-wrapper-height: 52px;
    --evl-input-height: 48px;
    --evl-input-padding-x: 1rem;
    --evl-input-font-size: 0.875rem;

    /* Shared form input background for native + Mapbox inputs */
    --evl-form-input-bg: #0F0F0F;

    --evl-results-bg: #111;
    --evl-results-border: #262626;
    --evl-results-font-size: 0.875rem;
    --evl-results-line-height: 1.25;
    --evl-results-max-height: 260px;
}

/* Wizard Container */
.wizard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Step Progress Header */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wizard-border);
    z-index: 0;
}

.wizard-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    flex: 1;
}

.wizard-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wizard-card-bg);
    border: var(--wizard-border-strong) solid var(--wizard-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--wizard-text-muted);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.wizard-step-indicator.active .wizard-step-circle {
    background: var(--wizard-primary);
    border-color: var(--wizard-primary);
    color: var(--btn-text);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.wizard-step-indicator.completed .wizard-step-circle {
    background: var(--wizard-success);
    border-color: var(--wizard-success);
    color: #fff;
}

.wizard-step-label {
    font-size: 0.875rem;
    color: var(--wizard-text-muted);
    text-align: center;
}

.wizard-step-indicator.active .wizard-step-label {
    color: var(--wizard-primary);
    font-weight: 600;
}

/* Wizard Card */
.wizard-card {
    background: var(--wizard-card-bg);
    border-radius: var(--wizard-radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wizard-step-content {
    display: none;
}

.wizard-step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Theme-aware Mapbox Search inputs (not the map) */
.mapbox-searchbox,
.mapboxgl-ctrl-geocoder {
    background: var(--surface, #f8f9fa);
    color: var(--text, #1a1a1a);
    border: var(--wizard-border-regular) solid var(--border, #e0e0e0);
    box-shadow: 0 2px 10px var(--shadow, rgba(0,0,0,0.08));
    border-radius: var(--wizard-radius-md);
}

.mapbox-searchbox input,
.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
    background: transparent;
    color: var(--text, #1a1a1a);
}

.mapbox-searchbox input::placeholder,
.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input::placeholder {
    color: var(--text-secondary, #4a4a4a);
}

html[data-theme="dark"] .mapbox-searchbox,
html[data-theme="dark"] .mapboxgl-ctrl-geocoder {
    background: var(--surface, #1a1a1a);
    color: var(--text, #f5f5f5);
    border: var(--wizard-border-regular) solid var(--border, #333333);
    box-shadow: 0 2px 12px var(--shadow, rgba(0,0,0,0.3));
    border-radius: var(--wizard-radius-md);
}

html[data-theme="dark"] .mapbox-searchbox input,
html[data-theme="dark"] .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
    color: var(--text, #f5f5f5);
}

html[data-theme="dark"] .mapbox-searchbox input::placeholder,
html[data-theme="dark"] .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input::placeholder {
    color: var(--text-secondary, #b8b8b8);
}

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

/* Step Header */
.wizard-step-header {
    margin-bottom: 2rem;
    text-align: center;
}

.wizard-step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
}

.wizard-step-subtitle {
    font-size: 1rem;
    color: var(--wizard-text-muted);
}

/* Form Groups */
.wizard-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.wizard-form-row.two-col {
    grid-template-columns: 1fr 1fr;
}

.wizard-form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.wizard-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Click-anywhere hint: make inputs/selects/geocoder look clickable */
.wizard-form-group .wizard-input,
.wizard-form-group .wizard-select,
.wizard-form-group .mapboxgl-ctrl-geocoder--input {
    cursor: text;
}

.wizard-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
}

.wizard-label.required::after {
    content: ' *';
    color: var(--wizard-error);
}

.wizard-input,
.wizard-select {
    padding: 0.875rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    color: var(--input-text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

/* ================================
     Fix date/time input color mismatch
     (Chrome/Safari native controls)
================================ */

/* Force date/time inputs to use the same base look as wizard inputs */
.wizard-step-content input[type="date"].wizard-input,
.wizard-step-content input[type="time"].wizard-input {
    background: var(--evl-mapbox-bg, #0F0F0F) !important; /* or use your real input bg variable */
    border: 1px solid var(--border, #333333) !important;  /* match your normal border token */
    color: var(--text, #ffffff) !important;
    box-shadow: var(--shadow, none) !important;

    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Make the calendar/clock icon area match (Chrome) */
.wizard-step-content input[type="date"].wizard-input::-webkit-calendar-picker-indicator,
.wizard-step-content input[type="time"].wizard-input::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.9); /* makes icon light in dark mode */
    cursor: pointer;
}

/* Fix inner text/placeholder-like parts for date/time (Chrome) */
.wizard-step-content input[type="date"].wizard-input::-webkit-datetime-edit,
.wizard-step-content input[type="time"].wizard-input::-webkit-datetime-edit {
    color: var(--text, #ffffff) !important;
}

/* If any segment still looks dim, force segments too */
.wizard-step-content input[type="date"].wizard-input::-webkit-datetime-edit-text,
.wizard-step-content input[type="date"].wizard-input::-webkit-datetime-edit-month-field,
.wizard-step-content input[type="date"].wizard-input::-webkit-datetime-edit-day-field,
.wizard-step-content input[type="date"].wizard-input::-webkit-datetime-edit-year-field,
.wizard-step-content input[type="time"].wizard-input::-webkit-datetime-edit-text,
.wizard-step-content input[type="time"].wizard-input::-webkit-datetime-edit-hour-field,
.wizard-step-content input[type="time"].wizard-input::-webkit-datetime-edit-minute-field,
.wizard-step-content input[type="time"].wizard-input::-webkit-datetime-edit-ampm-field {
    color: var(--text, #ffffff) !important;
}

.wizard-input::placeholder,
.wizard-select::placeholder {
    color: var(--input-placeholder);
}

input[type="date"].wizard-input,
input[type="time"].wizard-input {
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background: transparent;
}

input[type="date"].wizard-input::-webkit-calendar-picker-indicator,
input[type="time"].wizard-input::-webkit-calendar-picker-indicator {
    opacity: 0.9;
    filter: none;
    cursor: pointer;
}

html[data-theme="dark"] input[type="date"].wizard-input::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="time"].wizard-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
    opacity: 0.95;
}

.wizard-input:focus,
.wizard-select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.wizard-input.invalid,
.wizard-select.invalid {
    border-color: var(--wizard-error);
}

.wizard-error-message {
    color: var(--wizard-error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.wizard-form-group.has-error .wizard-error-message {
    display: block;
}

/* Location Input with Button */
.wizard-location-wrapper {
    display: grid;
    grid-template-columns: 200px 52px;
    column-gap: 0.75rem;
    align-items: center;
    width: 100%;
    height: 52px;
}

.wizard-location-wrapper > div:first-child {
    min-width: 0;
    overflow: hidden;
}

.wizard-location-btn {
    height: 52px;
    width: 52px;
    min-width: 52px;
    padding: 0;
    background: var(--wizard-primary);
    border: var(--wizard-border-strong) solid var(--wizard-border);
    border-radius: var(--wizard-radius-md);
    color: var(--btn-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-location-btn:hover {
    background: #c49d2e;
    transform: translateY(-2px);
}

/* Input shell for all wizard fields (includes Mapbox geocoder) */
.wizard-step-content .evl-input-shell {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    color: var(--input-text);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    height: 52px;
}

.wizard-step-content .evl-input-shell:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.wizard-step-content .evl-geocoder-shell {
    padding: 0;
    cursor: text;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--input,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder input,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--icon,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--button {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 100% !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder {
    flex: 1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--input,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder input {
    flex: 1;
    width: 100% !important;
    padding: 0 1rem !important;
    margin: 0 !important;
    color: var(--text) !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    font-family: 'Inter', sans-serif !important;
    outline: none !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--input::placeholder,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder input::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 1 !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--icon,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--button {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 0.75rem !important;
    color: var(--input-placeholder) !important;
    fill: currentColor !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--icon svg,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--button svg {
    fill: currentColor !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--list,
.wizard-step-content .evl-geocoder-shell .suggestions {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: var(--input-radius) !important;
    box-shadow: 0 4px 12px var(--shadow, rgba(0,0,0,0.15)) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--suggestion {
    background: var(--input-bg) !important;
    border-bottom: 1px solid var(--input-border) !important;
    color: var(--input-text) !important;
    padding: 0.75rem 1rem !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--suggestion:hover,
.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--suggestion.active {
    background: var(--wizard-card-bg) !important;
    color: var(--wizard-primary) !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--suggestion-title {
    color: var(--input-text) !important;
}

.wizard-step-content .evl-geocoder-shell .mapboxgl-ctrl-geocoder--suggestion-address {
    color: var(--input-placeholder) !important;
}

/* ============================================================
   MAPBOX SEARCH JS (search-js/v1.5.0) STYLING
   Targets hashed classes like .mbxXXXXXXXX--SearchBox
   ============================================================ */

/* Container for SearchBox / Geocoder components */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"],
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"]{
  width: 100% !important;
  max-width: 100% !important;
  height: var(--evl-input-height, 48px) !important;
  min-height: var(--evl-input-height, 48px) !important;
  box-sizing: border-box !important;

  display: flex !important;
  align-items: center !important;

    background: var(--evl-form-input-bg, #0F0F0F) !important;
  border: 1px solid var(--evl-input-border, #262626) !important;
  border-radius: var(--evl-input-radius, 12px) !important;

  color: var(--evl-input-text, #fff) !important;
  font-family: "Inter", sans-serif !important;
  font-size: var(--evl-input-font-size, 0.875rem) !important;

  /* Avoid vertical centering issues */
  line-height: 1.5 !important;
}

/* Force the actual input inside Search JS to match design */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"] input,
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"] input,
.wizard-step-content .evl-geocoder-shell input{
  width: 100% !important;
  height: var(--evl-input-height, 48px) !important;
  box-sizing: border-box !important;

  margin: 0 !important;
  padding: 0 var(--evl-input-padding-x, 1rem) !important;

    background: var(--evl-form-input-bg, #1a1a1a) !important;
  color: var(--evl-input-text, #fff) !important;

  font-family: "Inter", sans-serif !important;
  font-size: var(--evl-input-font-size, 0.875rem) !important;

  /* Perfect vertical centering via line-height */
  line-height: var(--evl-input-height, 48px) !important;

  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Dark theme dropdown results */
.wizard-step-content .evl-geocoder-shell [class*="--Results"]{
  background: #111 !important;
  border: 1px solid var(--evl-input-border, #262626) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  z-index: 3000 !important;
}

/* Individual suggestion items */
.wizard-step-content .evl-geocoder-shell [class*="--Suggestion"]{
  color: var(--evl-input-text, #fff) !important;
}

/* Suggestion hover state */
.wizard-step-content .evl-geocoder-shell [class*="--Suggestion"]:hover{
  background: #1a1a1a !important;
}

/* Parent wrappers must define the width; Mapbox must fill 100% */
.wizard-step-content .wizard-location-wrapper,
.wizard-step-content .evl-input-shell,
.wizard-step-content .evl-geocoder-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* ================================
     Mapbox Search JS — centered scale (5%)
================================ */

/* Visually enlarge shell without offset */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"],
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"] {
    transform: scale(1.05);
    transform-origin: center center;
}

/* Prevent scaling from affecting layout calculations */
.wizard-step-content .evl-geocoder-shell {
    overflow: visible;
}
/* Search JS container (do not use hashed class prefixes) */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"],
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    height: var(--evl-wrapper-height, 52px) !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;

    background: var(--evl-form-input-bg, #0F0F0F) !important;
    border: 1px solid var(--evl-input-border, #262626) !important;
    border-radius: var(--evl-input-radius, 12px) !important;

    font-family: "Inter", sans-serif !important;
    font-size: var(--evl-input-font-size, 0.875rem) !important;
    line-height: 1.25 !important;
    color: var(--evl-input-text, #fff) !important;
}

/* Ensure internal children don't force weird widths */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"] > *,
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"] > * {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* Input must stretch to fill remaining space */
.wizard-step-content .evl-geocoder-shell input {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    height: var(--evl-input-height, 48px) !important;
    box-sizing: border-box !important;

    padding: 0 var(--evl-input-padding-x, 1rem) !important;
    margin: 0 !important;

    background: var(--evl-form-input-bg, #0F0F0F) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    font-family: "Inter", sans-serif !important;
    font-size: var(--evl-input-font-size, 0.875rem) !important;
    line-height: var(--evl-input-height, 48px) !important;
    color: var(--evl-input-text, #fff) !important;
}

/* Autocomplete dropdown: normalize scale */
.wizard-step-content .evl-geocoder-shell [class*="--Results"] {
    background: var(--evl-results-bg, #111) !important;
    border: 1px solid var(--evl-results-border, #262626) !important;
    border-radius: 12px !important;

    max-height: var(--evl-results-max-height, 260px) !important;
    overflow-y: auto !important;

    font-family: "Inter", sans-serif !important;
    font-size: var(--evl-results-font-size, 0.875rem) !important;
    line-height: var(--evl-results-line-height, 1.25) !important;

    z-index: 4000 !important;
}

/* Force all dropdown descendants to inherit the smaller font */
.wizard-step-content .evl-geocoder-shell [class*="--Results"] *,
.wizard-step-content .evl-geocoder-shell [class*="--Suggestion"] * {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* =========================================
     Responsive width: always match outer shell
     (Remove fixed widths, fill parent)
========================================= */

/* Parent wrappers must define the width; Mapbox fills them */
.wizard-step-content #pickup-geocoder,
.wizard-step-content #dropoff-geocoder,
.wizard-step-content .wizard-location-wrapper,
.wizard-step-content .evl-input-shell,
.wizard-step-content .evl-geocoder-shell {
    width: 100% !important;
    max-width: none !important; /* remove caps */
    min-width: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* Mapbox Search JS container fills parent */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"],
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"]{
    width: 100% !important;
    max-width: none !important; /* remove caps */
    min-width: 0 !important;
    height: 52px !important;
    box-sizing: border-box !important;
}

/* ============================
     OFFSET FIX (inner wrapper)
============================ */

/* Kill Mapbox internal padding/translate that causes the “pill” offset */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"] *,
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"] *{
    box-sizing: border-box !important;
    transform: none !important;
}

/* The SearchBox container itself should be the shell */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"],
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"]{
    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: stretch !important;

    background: #333 !important;
    border: 1px solid #262626 !important;
    border-radius: 12px !important;
}

/* Force the internal “Input wrapper” to fill the shell (this is the part you were missing) */
.wizard-step-content .evl-geocoder-shell [class*="--Input"],
.wizard-step-content .evl-geocoder-shell [class*="Input"]{
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: stretch !important;
}

/* Force the actual input to fill and align perfectly */
.wizard-step-content .evl-geocoder-shell input{
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 16px !important;

    background: transparent !important;
    color: #fff !important;

    font-size: 0.875rem !important;
    font-family: "Inter", sans-serif !important;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* If Mapbox has an icon container, prevent it from shifting layout */
.wizard-step-content .evl-geocoder-shell [class*="Icon"],
.wizard-step-content .evl-geocoder-shell [class*="--SearchIcon"],
.wizard-step-content .evl-geocoder-shell svg,
.wizard-step-content .evl-geocoder-shell button{
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 0 !important;
}

/* ============================================================
   FLEX LAYOUT FIX: Make input fill wrapper width
   ============================================================ */

/* Ensure SearchBox internal layout stretches fully */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"],
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"]{
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

/* Make all direct children participate in flex layout correctly */
.wizard-step-content .evl-geocoder-shell [class*="--SearchBox"] > *,
.wizard-step-content .evl-geocoder-shell [class*="--Geocoder"] > *{
  min-width: 0 !important;
}

/* Force the input to actually take remaining space */
.wizard-step-content .evl-geocoder-shell input[class*="--Input"],
.wizard-step-content .evl-geocoder-shell input{
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* If Mapbox wraps input in a container, make that container grow too */
.wizard-step-content .evl-geocoder-shell [class*="--Input"]{
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Keep icons/buttons from forcing the input smaller */
.wizard-step-content .evl-geocoder-shell button,
.wizard-step-content .evl-geocoder-shell [role="button"]{
  flex: 0 0 auto !important;
}

/* Map Container */
.wizard-map-container {
    height: 450px;
    width: 100%;
    border-radius: var(--wizard-radius-lg);
    overflow: hidden;
    margin: 1.5rem 0;
    border: var(--wizard-border-strong) solid var(--wizard-border);
}

#wizard-map,
.mapboxgl-map,
.mapboxgl-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Route Stats */
.wizard-route-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.wizard-stat-card {
    background: var(--wizard-bg);
    padding: 1rem;
    border-radius: var(--wizard-radius-sm);
    text-align: center;
    border: var(--wizard-border-regular) solid var(--wizard-border);
}

.wizard-stat-label {
    font-size: 0.8rem;
    color: var(--wizard-text-muted);
    margin-bottom: 0.25rem;
}

.wizard-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wizard-primary);
}

/* Summary Section */
.wizard-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.wizard-summary-item {
    padding: 1rem;
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius-sm);
    border: var(--wizard-border-regular) solid var(--wizard-border);
}

.wizard-summary-label {
    font-size: 0.85rem;
    color: var(--wizard-text-muted);
    margin-bottom: 0.25rem;
}

.wizard-summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wizard-text);
}

/* Contact Mode */
.wizard-contact-section {
    margin: 1rem 0 2rem;
}

.wizard-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.wizard-mode-btn {
    padding: 0.65rem 1rem;
    border: var(--wizard-border-regular) solid var(--wizard-border);
    border-radius: var(--wizard-radius-md);
    background: var(--wizard-bg);
    color: var(--wizard-text);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wizard-mode-btn.active {
    background: var(--wizard-primary);
    color: var(--btn-text);
    border-color: var(--wizard-primary);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.wizard-mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-mode-note {
    color: var(--wizard-text-muted);
    font-size: 0.9rem;
}

.wizard-contact-card {
    background: var(--wizard-bg);
    border: var(--wizard-border-regular) solid var(--wizard-border);
    border-radius: var(--wizard-radius-sm);
    padding: 1.25rem;
}

.wizard-contact-hint {
    font-size: 0.9rem;
    color: var(--wizard-text-muted);
    margin-top: 0.5rem;
}

.wizard-input.readonly {
    background: var(--wizard-border);
    cursor: not-allowed;
}

/* Payment Section */
.wizard-payment-section {
    background: var(--wizard-bg);
    padding: 1.5rem;
    border-radius: var(--wizard-radius-sm);
    margin: 1.5rem 0;
    border: var(--wizard-border-regular) solid var(--wizard-border);
}

.wizard-payment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wizard-payment-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wizard-text);
}

.wizard-payment-notice {
    background: rgba(212, 175, 55, 0.1);
    padding: 1rem;
    border-radius: var(--wizard-radius-sm);
    margin-bottom: 1rem;
    border-left: calc(var(--wizard-border-strong) * 1.5) solid var(--wizard-primary);
}

.wizard-payment-notice p {
    margin: 0;
    color: var(--wizard-text);
    font-size: 0.9rem;
}

/* Stripe Element */
#stripe-payment-element {
    padding: 1rem;
    background: var(--wizard-bg);
    border: var(--wizard-border-regular) solid var(--wizard-border);
    border-radius: var(--wizard-radius-sm);
    margin: 1rem 0;
}

/* Navigation Buttons */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: var(--wizard-border-regular) solid var(--wizard-border);
}

.wizard-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--wizard-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-btn-secondary {
    background: var(--wizard-bg);
    color: var(--wizard-text);
    border: var(--wizard-border-regular) solid var(--wizard-border);
}

.wizard-btn-secondary:hover {
    background: var(--wizard-border);
}

.wizard-btn-primary {
    background: var(--wizard-primary);
    color: var(--btn-text);
}

.wizard-btn-primary:hover {
    background: #c49d2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.wizard-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Status Message */
.wizard-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.wizard-status.show {
    display: block;
}

.wizard-status.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--wizard-success);
    border: var(--wizard-border-regular) solid var(--wizard-success);
}

.wizard-status.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--wizard-error);
    border: var(--wizard-border-regular) solid var(--wizard-error);
}

.wizard-status.info {
    background: rgba(212, 175, 55, 0.1);
    color: var(--wizard-primary);
    border: var(--wizard-border-regular) solid var(--wizard-primary);
}

/* Loading Spinner */
.wizard-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .wizard-card {
        padding: 1.5rem;
    }

    .wizard-form-row.two-col,
    .wizard-form-row.three-col {
        grid-template-columns: 1fr;
    }

    .wizard-input,
    .wizard-select {
        min-height: 48px;
        height: auto;
    }

    input[type="date"].wizard-input,
    input[type="time"].wizard-input {
        min-height: 48px;
        height: 48px;
    }

    .wizard-route-stats {
        grid-template-columns: 1fr;
    }

    .wizard-summary-grid {
        grid-template-columns: 1fr;
    }

    .wizard-nav {
        flex-direction: column;
    }

    .wizard-btn {
        width: 100%;
        justify-content: center;
    }

    .wizard-progress {
        margin-bottom: 2rem;
    }

    .wizard-step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .wizard-step-label {
        font-size: 0.75rem;
    }
}

/* Tablet Responsive (iPad) */
@media (max-width: 1024px) and (min-width: 769px) {
    .wizard-form-row.two-col,
    .wizard-form-row.three-col {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .wizard-form-group {
        width: 100%;
        max-width: 100%;
    }
    
    .wizard-input,
    .wizard-select {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
        height: auto;
    }

    input[type="date"].wizard-input,
    input[type="time"].wizard-input {
        min-height: 48px;
        height: 48px;
    }
}

/* Vehicle Image Preview Styling */
#vehicle-preview-image {
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#vehicle-preview-image.vehicle-selected {
    border-color: var(--wizard-primary, #d4af37);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

@media (max-width: 480px) {
    .wizard-step-label {
        display: none;
    }

    .wizard-container {
        padding: 1rem 0.5rem;
    }
}
