/* 
   Midnight Boutique - Obsidian Glass Search Card
   VERSION: Visual Perfection V2 (Synchronized & Functional)
*/

:root {
  --glass-bg: rgba(0, 0, 0, 0.55); /* Deeper black for high contrast */
  --glass-border: rgba(255, 255, 255, 0.2); /* Crisper outer border */
  --accent-orange: #ff5722;
  --accent-orange-glow: rgba(255, 87, 34, 0.4);
  --text-main: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.5);
  --card-radius: 32px;
  --pill-radius: 20px;
  --pill-height: 64px;
}

.search-card-glass-container {
  width: 100%;
  max-width: 500px;
  margin: -60px auto 40px auto; /* Pulls the card up over the slider */
  position: relative;
  z-index: 150; /* Ensures it sits above both the slider and the map */
  perspective: 1000px;
}

/* Fix for Google Maps Autocomplete dropdown visibility */
.pac-container {
  z-index: 10000 !important;
  border-radius: 12px;
  margin-top: 5px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  background-color: #fff;
  border: 1px solid rgba(0,0,0,0.1);
}

.search-card-glass {
  position: relative;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 32px 24px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 40px 100px rgba(0, 0, 0, 0.9), 0 10px 40px rgba(0, 0, 0, 0.4); /* Added inset rim light for premium 3D contrast */
  box-sizing: border-box;
  color: var(--text-main);
  z-index: 100;
  font-family: 'Inter', sans-serif;
}

/* Mode Selector - iOS Style Toggles */
.search-card-glass .mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-card-glass .btn-mode {
  flex: 1;
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-card-glass .btn-mode.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  box-shadow: 0 10px 25px var(--accent-orange-glow);
}

/* Field Rows - ENFORCED 64PX STACK */
.search-card-glass .field-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
  width: 100%;
}

.search-card-glass .field-row-split {
  flex-direction: row;
  gap: 12px;
}

.search-card-glass .field-row-split .field-pill {
  flex: 1;
  min-width: 0;
}

.search-card-glass .field-pill {
  position: relative;
  width: 100%;
  height: var(--pill-height);
  background: rgba(0, 0, 0, 0.25); /* Darker groove for high contrast */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--pill-radius);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6); /* Inset shadow creates depth */
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 0 20px;
}

.search-card-glass .icon-main {
  color: var(--accent-orange);
  font-size: 18px;
  z-index: 10;
  pointer-events: none;
}

.search-card-glass .field-pill input,
.search-card-glass .field-pill select {
  flex: 1;
  height: 100%;
  background: transparent !important;
  border: none !important;
  color: var(--text-main) !important;
  font-size: 16px;
  font-weight: 600;
  text-align: left; /* Left aligned as requested */
  padding: 0 40px 0 16px; /* Corrected left padding: 16px away from icon */
  outline: none;
  box-sizing: border-box;
}

.search-card-glass .field-pill input::placeholder {
  color: #ffffff !important; /* Bright white as requested */
  opacity: 1 !important;
}

/* Native Date Picker - Invisible but clickable hit area */
.search-card-glass input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 5;
}

/* Clear Button (X) - Circular Glass */
.search-card-glass .btn-clear {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 50% !important; /* Circular */
  border: 1px solid rgba(255,255,255,0.2) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s ease;
}

.search-card-glass .btn-clear:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.1);
}

/* Swap Control - Precision Junction Overlap */
.search-card-glass .swap-control {
  position: absolute;
  right: -10px;
  top: 70px; /* (64+12+64)/2 */
  z-index: 50;
  transform: translateY(-50%);
}

.search-card-glass .btn-swap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-orange);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}

.search-card-glass .btn-swap:hover {
  transform: scale(1.1) rotate(180deg);
}

/* Toggle Pill - iOS Switch */
.search-card-glass .toggle-pill {
  width: 100%;
  height: var(--pill-height);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--pill-radius);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
}

.search-card-glass .toggle-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.search-card-glass .icon-orange {
  color: var(--accent-orange);
}

/* iOS Switch Styling */
.search-card-glass .ios-switch {
  position: relative;
  width: 50px;
  height: 28px;
}

.search-card-glass .ios-switch input {
  opacity: 0; width: 0; height: 0;
}

.search-card-glass .ios-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
}

.search-card-glass .ios-slider:before {
  position: absolute;
  content: "";
  height: 22px; width: 22px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.search-card-glass input:checked + .ios-slider {
  background-color: #4cd964;
}

.search-card-glass input:checked + .ios-slider:before {
  transform: translateX(22px);
}

/* Search Button - Large Premium Pill */
.search-card-glass .btn-search-glass {
  width: 100%;
  height: 76px;
  background: var(--accent-orange);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 20px 50px var(--accent-orange-glow);
  transition: all 0.3s ease;
}

.search-card-glass .btn-search-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px var(--accent-orange-glow);
}

/* Route Info & Price Pill Styling */
.search-card-glass .info-output-pill {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.4;
  box-sizing: border-box;
}

.search-card-glass .info-output-pill strong {
  color: var(--accent-orange);
}

.search-card-glass .price-output {
  background: rgba(76, 217, 100, 0.1);
  border-color: rgba(76, 217, 100, 0.3);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.search-card-glass .toll-warning {
  display: inline-block;
  margin-left: 10px;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}
