.bg-white.dark\:bg-gray-800.rounded-xl.border.border-gray-200.dark\:border-gray-700.p-6 {
  min-height: 180px; /* reduce default min-height so cards aren't overly tall */
}

/**
 * Forms Component Styles
 * Form validation, character counting, and input styles
 * Extracted from list-spot-3step.css
 */

/* ============================================================================
   FORM VALIDATION STATES
   ============================================================================ */

.field-success {
  border-color: var(--success-green) !important;
  background-color: #f0fdf4 !important;
}

.field-error {
  border-color: var(--error-red) !important;
  background-color: #fef2f2 !important;
}

/* ============================================================================
   CHARACTER COUNTING VALIDATION
   ============================================================================ */

/* Character count validation classes */
.character-count-valid { color: var(--success-green); }
.character-count-warning { color: var(--warning-orange); }
.character-count-error { color: var(--error-red); }

/* Character counter elements */
#title-count,
#description-count {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
}

/* Light mode character counter colors */
#title-count.text-gray-500,
#description-count.text-gray-500 {
  color: #6b7280 !important;
}

#title-count.text-orange-500,
#description-count.text-orange-500 {
  color: #f59e0b !important;
}

#title-count.text-red-500,
#description-count.text-red-500 {
  color: #ef4444 !important;
}

#title-count.text-green-600,
#description-count.text-green-600 {
  color: #10b981 !important;
}

/* ============================================================================
   FORM INPUT STYLES
   ============================================================================ */

/* Base input styles - enhanced from list-spot-3step.css */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 16px;
  transition: all var(--transition-smooth);
  background: white;
  color: #1f2937;
}

/* Postal code input specific styling */
#postalCodeEdit {
  text-transform: uppercase;
}

#postalCodeEdit::placeholder {
  font-family: inherit;
  font-weight: normal;
  text-transform: uppercase;
}

/* Country field styling - fixed as Canada */
#countryEdit {
  background-color: #f3f4f6 !important;
  color: #374151 !important;
  cursor: not-allowed;
  font-weight: 500;
}

#countryEdit::placeholder {
  color: #9ca3af !important;
}

.dark #countryEdit {
  background-color: #374151 !important;
  color: #d1d5db !important;
}

.dark #countryEdit::placeholder {
  color: #6b7280 !important;
}

#postalCodeEdit:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}

/* Postal code formatting indicator */
#postalCodeEdit.formatting {
  background-color: #f0f9ff;
  border-color: #3b82f6;
  animation: postalFormatPulse 0.3s ease-in-out;
}

@keyframes postalFormatPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* Dark mode postal code styling */
.dark #postalCodeEdit {
  background: #1f2937;
  color: #f9fafb;
  border-color: #4b5563;
}

.dark #postalCodeEdit:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 20%);
}

.dark #postalCodeEdit.formatting {
  background-color: #1e3a8a;
  border-color: #3b82f6;
}

/* ============================================================================
   PROVINCE DROPDOWN STYLES
   ============================================================================ */

/* Province dropdown specific styling */
#provinceEdit {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 32px;
  cursor: pointer;
}

#provinceEdit:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

#provinceEdit option {
  padding: 8px 12px;
  font-size: 14px;
}

#provinceEdit option:checked {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

#provinceEdit option:hover {
  background-color: #f3f4f6;
}

/* Dark mode province dropdown styling */
.dark #provinceEdit {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca5f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.dark #provinceEdit:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.dark #provinceEdit option {
  background-color: #1f2937;
  color: #f9fafb;
}

.dark #provinceEdit option:checked {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.dark #provinceEdit option:hover {
  background-color: #374151;
}

/* Remove spinner buttons from number inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Input focus states */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}

/* Autocomplete input */
#autocomplete {
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-base);
  transition: all var(--transition-smooth);
}

#autocomplete {
  position: relative;
}

#autocomplete:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}

/* Enhanced field validation states from list-spot-3step.css */
.field-success {
  border-color: var(--success-green) !important;
  box-shadow: 0 0 0 3px rgb(16 185 129 / 10%) !important;
}

.field-error {
  border-color: var(--error-red) !important;
  box-shadow: 0 0 0 3px rgb(239 68 68 / 10%) !important;
}

/* ============================================================================
   GOOGLE PLACES AUTOCOMPLETE STYLING
   ============================================================================ */

/* Google Places Autocomplete suggestions styling from list-spot-3step.css */
.pac-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgb(0 0 0 / 10%);
  border: 1px solid #e5e7eb;
  margin-top: 4px;
  z-index: 1000 !important;
}

.pac-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  font-size: 14px;
}

.pac-item:hover {
  background-color: #f8fafc;
}

.pac-item:last-child {
  border-bottom: none;
}

/* Dark mode support for autocomplete dropdown */
.dark .pac-container {
  background-color: #374151;
  border-color: #4b5563;
  box-shadow: 0 10px 25px rgb(0 0 0 / 30%);
}

.dark .pac-item {
  color: #f9fafb;
  border-bottom-color: #4b5563;
}

.dark .pac-item:hover {
  background-color: #4b5563;
}

/* ============================================================================
   FORM VALIDATION MESSAGES
   ============================================================================ */

.step-error-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--error-red);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius-base);
  text-align: center;
  z-index: 10;
}

.wizard-step .step-error-message {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 1rem 0;
}

/* ============================================================================
   FORM ACCESSIBILITY
   ============================================================================ */

/* Focus visible styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* ============================================================================
   FORM RESPONSIVE STYLES
   ============================================================================ */

@media (width <= 768px) {
  input, textarea, select {
    padding: 0.75rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
  }
}

/* ============================================================================
   FORM DARK MODE SUPPORT
   ============================================================================ */

/* Dark mode input styles */
.dark input[type="text"],
.dark input[type="number"],
.dark input[type="email"],
.dark input[type="tel"],
.dark textarea,
.dark select {
  background-color: var(--color-dark-surface);
  color: var(--color-dark-text);
  border-color: var(--color-dark-border);
}

.dark #autocomplete {
  background-color: #374151 !important;
  color: #f9fafb !important;
  border-color: #4b5563 !important;
}

.dark select option {
  background-color: var(--color-dark-surface);
  color: var(--color-dark-text);
}

.dark select option:checked {
  background-color: var(--color-primary-blue);
  color: white;
}

.dark select option:hover {
  background-color: var(--color-gray-700);
}

.dark input[type="text"]:focus,
.dark input[type="number"]:focus,
.dark input[type="email"]:focus,
.dark input[type="tel"]:focus,
.dark textarea:focus,
.dark select:focus {
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 20%);
}

.dark #autocomplete:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 20%);
}

.dark #autocomplete::placeholder {
  color: #9ca3af !important;
}

/* Dark mode character counter colors */
.dark #title-count.text-gray-400,
.dark #description-count.text-gray-400 {
  color: #9ca3af !important;
}

.dark #title-count.text-orange-400,
.dark #description-count.text-orange-400 {
  color: #fb923c !important;
}

.dark #title-count.text-red-400,
.dark #description-count.text-red-400 {
  color: #f87171 !important;
}

.dark #title-count.text-green-400,
.dark #description-count.text-green-400 {
  color: #4ade80 !important;
}

/* ============================================================================
   FORM ANIMATIONS AND TRANSITIONS
   ============================================================================ */

/**
 * Form Field Animations
 * Smooth entrance animations for form elements
 */
.field-group {
  animation: fade-in-up 0.6s ease-out;
}

/* Note: fade-in-up animation defined in custom.css to avoid duplication */

/* ============================================================================
   REQUIRED LABEL STYLING
   ============================================================================ */

/* Custom styling for "Required" labels with lighter blue shades from custom.css */
.bg-blue-100.text-blue-800 {
  background-color: #dbeafe !important; /* Even lighter blue background */
  color: #1e40af !important; /* Slightly lighter blue text */
}

.dark .bg-blue-100.text-blue-800 {
  background-color: rgb(59 130 246 / 15%) !important; /* Very light blue background in dark mode */
  color: #93c5fd !important; /* Light blue text in dark mode */
}

/* Apply to any element with both required label classes */
.required-label,
[class*="bg-blue-100"][class*="text-blue-800"] {
  background-color: var(--color-required-bg-light) !important;
  color: var(--color-required-text-light) !important;
}

.dark .required-label,
.dark [class*="bg-blue-100"][class*="text-blue-800"] {
  background-color: var(--color-required-bg-dark) !important;
  color: var(--color-required-text-dark) !important;
}

/* ============================================================================
   ENHANCED PHONE INPUT SYSTEM
   ============================================================================ */

/* Enhanced phone input system from custom.css */
.phone-input-wrapper {
  position: relative;
}

#country-dropdown {
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--color-gray-200);
  backdrop-filter: blur(10px);
}

.dark #country-dropdown {
  border-color: var(--color-gray-600);
  box-shadow: 0 10px 25px rgb(0 0 0 / 30%);
}

.country-option:hover {
  background-color: var(--color-gray-100) !important;
}

.dark .country-option:hover {
  background-color: var(--color-gray-700) !important;
}

/* Structured phone number input */
#phone_number {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  font-size: 16px;
}

#phone_number::placeholder {
  color: var(--color-gray-400);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.dark #phone_number::placeholder {
  color: var(--color-gray-500);
}

/* Focus indicators for accessibility */
#country-selector-btn:focus {
  outline: 2px solid var(--color-primary-blue);
  outline-offset: 2px;
}

#country-search:focus {
  box-shadow: 0 0 0 2px var(--color-primary-blue);
}

/* Phone input responsive */
@media (width <= 640px) {
  #country-dropdown {
    width: 100vw;
    left: -1rem;
    max-width: calc(100vw - 2rem);
  }

  .phone-input-wrapper {
    flex-direction: column;
  }

  .phone-input-wrapper > div:first-child {
    border-radius: var(--border-radius-base) var(--border-radius-base) 0 0;
    border-bottom: 0;
  }

  .phone-input-wrapper input[type="tel"] {
    border-radius: 0 0 var(--border-radius-base) var(--border-radius-base);
    border-top: 0;
  }

  /* Ensure address autocomplete input is not affected by phone styles */
  #autocomplete {
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
  }
}

/* ============================================================================
   ENHANCED INPUT STYLES
   ============================================================================ */

/* Enhanced input styles from custom.css */
.input-enhanced {
  background: white;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--border-radius-base);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
  width: 100%;
}

.input-enhanced:focus {
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
  background: var(--color-gray-50);
}

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

html.dark .input-enhanced {
  background: var(--color-dark-surface);
  border-color: var(--color-dark-border);
  color: var(--color-dark-text);
}

html.dark .input-enhanced:focus {
  background: var(--color-dark-bg-secondary);
  border-color: var(--color-primary-blue);
}

/* ============================================================================
   FORM ENHANCEMENTS
   ============================================================================ */

/* Form group styling from custom.css */
.form-group {
  margin-bottom: 1.5rem;
}

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

html.dark .form-label {
  color: var(--color-dark-text-muted);
}

/* ============================================================================
   FORM SECTION LAYOUTS
   ============================================================================ */

/* Form section pair layout is controlled via Tailwind utilities in templates. */

/* Enforce two-column layout on desktop regardless of utility collisions */
@media (min-width: 1024px) {
  .form-section-pair {
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem !important; /* larger gap so cards don't look cramped */
  }
  /* Slightly reduce each card width to account for the gap and make them a touch thinner */
  .form-section-pair > div {
    width: calc(50% - 1rem) !important;
    flex: 0 0 calc(50% - 1rem) !important;
    max-width: calc(50% - 1rem) !important;
  }
  .form-section-pair > div:last-child {
    width: calc(50% - 1rem) !important;
    flex: 0 0 calc(50% - 1rem) !important;
    max-width: calc(50% - 1rem) !important;
  }
}

/* ============================================================================
   STEP 1: VEHICLE SIZE BUTTON POLISH
   ============================================================================ */

/* Size option cards: rounded, centered, safe text wrapping */
.vehicle-size-option .size-card {
  border-radius: 0.5rem; /* rounded-lg */
  min-height: 3.5rem; /* ~min-h-14 */
  min-width: 120px; /* prevent ultra-narrow buttons that cause vertical text */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: visible;
  transition: all 200ms ease-in-out;
}

/* Ensure inline size grids create horizontal chips instead of narrow columns */
.inline-size-panel .grid {
  grid-auto-flow: row !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
}

/* Google Autocomplete (legacy) input normalization */
#autocomplete,
#autocomplete:where(input) {
  background-color: var(--color-dark-surface, #ffffff) !important;
  color: var(--color-dark-text, #111827) !important;
  border: 1px solid var(--color-gray-300, #d1d5db) !important;
}

.dark #autocomplete,
.dark #autocomplete:where(input) {
  background-color: #374151 !important; /* gray-700 */
  color: #f9fafb !important;            /* gray-50 */
  border-color: #4b5563 !important;     /* gray-600 */
}

/* Map controls reused from book_nearby for ListSpot map */
.map-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Add expand map button positioning */
.map-expand-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .map-controls {
    top: 5px;
    left: 5px;
  }

  .map-expand-controls {
    top: 5px;
    right: 5px;
  }

  .map-control-btn {
    padding: 4px 6px;
    min-width: 32px;
    font-size: 10px;
  }

  /* Extra compact satellite button on mobile */
  #map-type-btn {
    padding: 3px 4px;
    min-width: 28px;
    font-size: 9px;
  }

  #map-type-btn span {
    font-size: 9px;
    margin-left: 1px;
  }

  /* Ensure expand button is prominent on mobile */
  #expand-map-btn {
    padding: 6px 8px;
    min-width: 36px;
    font-size: 10px;
  }
}

.map-control-btn {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-size: 11px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}

.map-control-btn:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.map-control-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Make satellite button more compact */
#map-type-btn {
  padding: 4px 6px;
  min-width: 32px;
  font-size: 10px;
}

#map-type-btn span {
  font-size: 10px;
  margin-left: 2px;
}

/* Ensure expand button is always visible */
#expand-map-btn {
  z-index: 25;
  background: #10b981;
  color: white;
  border-color: #10b981;
}

#expand-map-btn:hover {
  background: #059669;
  border-color: #059669;
}

/* Ensure map container properly handles positioned controls */
#map {
  position: relative;
  overflow: visible;
}

/* Prevent map controls from being cut off */
.map-controls,
.map-expand-controls {
  pointer-events: auto;
  user-select: none;
}

/* Debug: Ensure expand button is visible */
#expand-map-btn {
  position: relative;
  z-index: 999 !important;
  background: #10b981 !important;
  color: white !important;
  border: 2px solid #059669 !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Debug: Ensure satellite button doesn't overlap */
#map-type-btn {
  position: relative;
  z-index: 998 !important;
  max-width: 80px;
  overflow: hidden;
}

/* Ensure map container doesn't hide controls */
#map {
  position: relative !important;
  overflow: visible !important;
  z-index: 1;
}

/* Force map controls to be visible */
.map-controls,
.map-expand-controls {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}


.vehicle-size-option .size-card .text-xs {
  white-space: normal; /* allow wrapping */
  word-break: normal; /* avoid splitting words mid-letter */
  overflow-wrap: break-word; /* wrap only at word boundaries */
  line-height: 1.1rem; /* tighten lines slightly */
}

/* Selected state (also set inline by JS, but keep consistent styling here) */
.vehicle-size-option[aria-selected="true"] .size-card {
  border-color: #3b82f6 !important; /* blue-500 */
  background-color: rgba(59, 130, 246, 0.1) !important; /* blue-500/10 */
}

/* Hover elevation */
.vehicle-size-option .size-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Keyboard focus for category cards */
.vehicle-category-option:focus-visible .vehicle-category-card {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
  outline: none;
}

/* ============================================================================
   STEP 1: AMENITIES LAYOUT (compact, multi-row on desktop)
   ============================================================================ */
.amenities-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 0.5rem 0.75rem !important; /* row x column gap */
  justify-items: start !important; /* prevent buttons stretching full width */
}

@media (min-width: 1024px) {
  .amenities-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    max-width: 1100px; /* avoid spanning entire container with very few tall rows */
  }
}

.amenity-option {
  width: auto !important;
}

/* Override grid with natural wrapping to remove awkward spacing between chips */
.amenities-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem 0.75rem !important; /* row x column gap */
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (min-width: 1024px) {
  .amenities-container {
    max-width: 980px !important; /* constrain width so chips form 2–3 neat rows */
  }
}

.amenity-option {
  flex: 0 0 auto !important; /* keep natural chip width */
}

/* Tighten vehicle category cards to visually reduce spacing without changing grid gap */
.vehicle-category-card {
  padding: 0.75rem !important; /* p-3 default to preserve touch target */
}
