/* ────────────────────────────────────────────────────────────────────────────
   APP STYLES — Map & Parking Finder
   ───────────────────────────────────────────────────────────────────────────── */

@import url('global.css');

/* ── Layout ────────────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
}

#app {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

#map {
  flex: 1;
  height: 100%;
  z-index: 1;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  z-index: 10;
  box-shadow: 2px 0 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

#sidebar-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-link:hover .logo-icon {
  opacity: 0.8;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text h2 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
}

#location-status {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#location-status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

#search-wrap {
  position: relative;
}

#search {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

#search:focus { border-color: var(--secondary); }

#search::placeholder {
  color: var(--text-muted);
}

#search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
}

/* ── Parking list ──────────────────────────────────────────────────────── */
#parking-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 0;
}

#parking-list::-webkit-scrollbar { width: 4px; }
#parking-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.parking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 12px 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.parking-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.parking-item.active {
  border-color: var(--secondary);
  background: var(--active-bg);
}
.parking-item.nearest { border-color: var(--primary); }
.parking-item.nearest.active { background: var(--nearest-active-bg); border-color: var(--primary); }

.item-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.item-icon.icon-nearest { background: var(--primary); }

.item-info { flex: 1; min-width: 0; }

.item-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-address {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.item-plazas {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.item-walk {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.item-dist {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* .nearest-star { (replaced with badge-nearest)
  color: var(--primary);
  font-size: 14px;
} */

/* ── Sort bar ───────────────────────────────────────────────────────────── */
#sort-bar, #filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0 12px;
}

.sort-label {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sort-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.sort-btn.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.filter-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

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

/* ── Sheet actions ──────────────────────────────────────────────────────── */
.sheet-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px 20px;
  background: var(--surface);
  flex-shrink: 0;
}

.btn-photo {
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
  white-space: nowrap;
}

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

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-inverse);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Photo modal ────────────────────────────────────────────────────────── */
#photo-modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

#photo-modal.visible {
  opacity: 1;
  pointer-events: all;
}

.photo-modal-inner {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.photo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.photo-modal-header button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
}

#photo-img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge-zona {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.zona-levante  { background: var(--zona-levante-bg);  color: var(--zona-levante-text); }
.zona-poniente { background: var(--zona-poniente-bg); color: var(--zona-poniente-text); }

.badge-nearest,
.badge-best {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  margin-top: 5px;
  white-space: nowrap;
}

.badge-nearest {
  background: var(--primary);
  color: white;
}

.badge-best {
  background: var(--success);
  color: white;
}

/* ── Bottom sheet ──────────────────────────────────────────────────────── */
#bottom-sheet {
  position: absolute;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
  z-index: 20;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), left 0.3s ease;
  display: flex;
  flex-direction: column;
  max-height: 48vh;
}

#bottom-sheet.visible { transform: translateY(0); }

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
}

.sheet-content {
  padding: 14px 16px 0;
  overflow-y: auto;
  flex: 1;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.sheet-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
  margin-bottom: 2px;
}

.sheet-address {
  font-size: 14px;
  color: var(--text-muted);
}

.close-sheet {
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.close-sheet:hover { background: var(--border); }

.sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.chip-green {
  background: var(--chip-green-bg);
  border-color: var(--chip-green-border);
  color: var(--primary);
  font-weight: 700;
}

.chip-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-block;
}

.chip-link:hover {
  opacity: 0.85;
}

/* ── Bus stops ──────────────────────────────────────────────────────────── */
.bus-marker-icon {
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  transition: transform 0.2s ease;
}

.bus-marker-highlight {
  font-size: 28px;
  line-height: 36px;
  filter: drop-shadow(0 0 8px rgba(2, 132, 199, 0.6));
}

.sheet-bus-toggle {
  border-top: 1px solid var(--border);
  margin: 8px 0 0 0;
}

.bus-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  gap: 8px;
  transition: background 0.15s;
}

.bus-toggle-header:active {
  background: var(--bg-hover);
}

.bus-toggle-text {
  flex: 1;
  text-align: left;
}

.bus-toggle-arrow {
  display: inline-block;
  font-size: 12px;
  transition: transform 0.2s;
  width: 12px;
  text-align: center;
}

.bus-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 16px;
}

.bus-container.expanded {
  max-height: 500px;
  padding: 8px 16px 12px 16px;
}

.bus-list {
  display: flex;
  flex-direction: column;
}

.bus-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bus-stop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text);
}

.bus-stop:last-child {
  margin-bottom: 0;
}

.bus-stop-name {
  flex: 1;
  font-weight: 500;
  margin-bottom: 4px;
}

.bus-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bus-line-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 20px;
  text-align: center;
}

.bus-stop-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.bus-stop-dist {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bus-stop-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.bus-stop-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.bus-stop-link:active {
  opacity: 0.5;
}

.bus-loading {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-navigate {
  display: block;
  flex: 1;
  padding: 14px;
  background: var(--primary);
  color: white;
  text-align: center;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}

.btn-navigate:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-navigate:active { transform: translateY(0); }

/* ── Active marker pin ──────────────────────────────────────────────────── */
.marker-active-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
  animation: marker-pop 0.2s ease-out;
}

@keyframes marker-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.marker-active-label {
  background: var(--surface-inverse);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  margin-bottom: 4px;
}

.marker-active-pin {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.marker-active-tip {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--accent);
  margin-top: -2px;
}

/* ── User dot ───────────────────────────────────────────────────────────── */
.user-dot {
  width: 20px;
  height: 20px;
  background: var(--secondary);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
  animation: user-pulse 2s ease-in-out infinite;
}

@keyframes user-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1); }
}

/* ── Loader overlay ────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--loader-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.4s;
}

#loader.fade-out { opacity: 0; pointer-events: none; }

.loader-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  animation: bounce 0.8s ease-in-out infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(-6px); }
  to   { transform: translateY(6px); }
}

.loader-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.loader-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Collapse button (inside sidebar header) ────────────────────────────── */
#dark-btn, #collapse-btn {
  background: var(--bg);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

#dark-btn:hover { background: var(--border); }

#collapse-btn {
  margin-left: auto;
  transition: background 0.15s, transform 0.3s;
}

#collapse-btn:hover { background: var(--border); }

#sidebar.collapsed #collapse-btn { transform: rotate(180deg); }

/* ── Mobile sidebar toggle ──────────────────────────────────────────────── */
#sidebar-toggle {
  display: none;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 15;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  width: 52px;
  height: 52px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#sidebar-toggle:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* ── Collapse button hidden on desktop ───────────────────────────────────── */
@media (min-width: 769px) {
  #collapse-btn { display: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 85vw;
    max-width: 340px;
    transform: translateX(-100%);
    z-index: 30;
  }

  #sidebar.open { transform: translateX(0); }

  #sidebar-toggle { display: flex; }

  #bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 38vh;
  }

  .sheet-actions {
    gap: 6px;
    padding: 8px 12px max(12px, env(safe-area-inset-bottom));
  }

  .btn-navigate {
    padding: 10px;
    font-size: 13px;
  }

  .btn-photo {
    padding: 10px 12px;
    font-size: 13px;
  }

  .chip {
    font-size: 12px;
    padding: 4px 9px;
  }

  .sheet-title { font-size: 17px; }
  .sheet-address { font-size: 13px; }
}

/* ── Cookie Banner ───────────────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 30;
  padding: 16px;
  display: none;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-text {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.cookie-text p {
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.cookie-text p:first-child {
  font-weight: 600;
  margin-bottom: 4px;
}

.cookie-text a {
  color: var(--primary);
  text-decoration: none;
}

.cookie-text a:hover {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept,
.btn-cookie-reject {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-cookie-accept {
  background: var(--primary);
  color: white;
}

.btn-cookie-accept:hover {
  opacity: 0.85;
}

.btn-cookie-reject {
  background: var(--border);
  color: var(--text);
}

.btn-cookie-reject:hover {
  opacity: 0.7;
}

/* ── Beach Markers ─────────────────────────────────────────────────────────── */
.beach-marker-icon {
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beach-marker-icon:hover {
  transform: scale(1.15);
}

/* ── Beach Details Sheet ───────────────────────────────────────────────────── */
.sheet-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.beach-info {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.beach-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.beach-details {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beach-details li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.beach-details strong {
  color: var(--text);
  font-weight: 600;
}

.beach-services {
  list-style: disc;
  padding-left: 20px;
  margin-top: 8px;
  gap: 4px;
  display: flex;
  flex-direction: column;
}

.beach-services li {
  color: var(--text-muted);
  font-size: 13px;
}

.beach-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 8px 0;
  line-height: 1.6;
}

.beach-info a {
  color: var(--primary);
  text-decoration: none;
}

.beach-info a:hover {
  text-decoration: underline;
}

.beach-info-highlight {
  background: rgba(34, 197, 94, 0.08);
  border-left: 4px solid var(--primary);
}

.beach-info-highlight h3 {
  color: var(--primary);
}

.beach-chips-detailed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.chip-detailed {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cookie-buttons {
    flex-direction: column;
  }

  .btn-cookie-accept,
  .btn-cookie-reject {
    width: 100%;
  }
}

/* ── Accommodation Panel ───────────────────────────────────────────────────── */
#accommodation-panel,
#booking-panel {
  padding: 10px 16px 4px;
}

#accommodation-label {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px 0;
  font-weight: 500;
}

#accommodation-input-wrap {
  position: relative;
  margin-bottom: 6px;
}

#accommodation-address {
  width: 100%;
  padding: 10px 80px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#accommodation-address:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2,132,199,0.1);
}

#accommodation-clear {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 8px;
  background: none;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
  line-height: 1;
}

#accommodation-clear:hover {
  color: var(--text);
}

#accommodation-clear:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#accommodation-submit {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  line-height: 1;
}

#accommodation-submit:hover {
  background: var(--primary-dark);
}

#accommodation-submit:active {
  transform: translateY(-50%) scale(0.95);
}

#no-accommodation-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  margin-bottom: 4px;
}

#booking-panel {
  background: #f0f9ff;
  border: 1px solid var(--chip-green-border);
  border-radius: 8px;
  margin: 8px 16px;
  padding: 12px;
  font-size: 13px;
}

#booking-panel p {
  margin: 0 0 8px 0;
  color: var(--text);
}

.booking-link {
  display: block;
  margin: 8px 0;
  background: #003580;
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.booking-link:hover {
  background: #002151;
}

#booking-close-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ========== Dark mode adjustments ========== */

[data-theme="dark"] .bus-detail-stat {
  background: rgba(255, 255, 255, 0.05);
}


/* ========== Sidebar scroll fix ========== */
.mode-bar { flex-shrink: 0; }
#accommodation-panel { flex-shrink: 0; }
#sort-bar { flex-shrink: 0; }
#filter-bar { flex-shrink: 0; }

/* Bus sidebar: flex chain for scroll */
#bus-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.bus-search { flex-shrink: 0; }
.bus-filters { flex-shrink: 0; }
.bus-sidebar-footer { flex-shrink: 0; }

.bus-lines-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px 0;
}

.bus-lines-list::-webkit-scrollbar { width: 4px; }
.bus-lines-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

