/* === Marker Label (Leaflet tooltip) === */
.leaflet-tooltip.marker-label {
  background: white;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid rgba(0,0,0,0.15);
  white-space: nowrap;
}

.leaflet-tooltip.marker-label:before {
  display: none;
}

.leaflet-tooltip.terminal-label {
  color: #B71C1C;
  font-size: 12px;
}

/* Leaflet divIcon background reset (so SVG circle isn't covered by white box) */
.marker-hotel,
.marker-kitchen,
.marker-bus,
.marker-terminal,
.flag-icon {
  background: transparent;
  border: none;
}

/* Leaflet popup style alignment with original info-window */
.leaflet-popup-content-wrapper {
  border-radius: 6px;
  padding: 0;
}

.leaflet-popup-content {
  margin: 8px;
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #333;
}

/* === Header === */
.header {
  background: linear-gradient(135deg, #5C3D1A, #8B6914);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 100;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-sidebar-btn {
  display: block;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 20px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: rgba(255,255,255,0.3);
  touch-action: manipulation;
  position: relative;
  z-index: 100;
}

.toggle-sidebar-btn:hover {
  background: rgba(255,255,255,0.35);
}

/* === Main Layout === */
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* === Sidebar === */
.sidebar {
  width: 360px;
  background: #f8f9fa;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease, min-width 0.3s ease;
  min-width: 360px;
  flex-shrink: 0;
}

.sidebar.hidden {
  width: 0 !important;
  min-width: 0 !important;
  border-right: none;
  overflow: hidden;
}

.sidebar.hidden .sidebar-content {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.sidebar-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  height: 100%;
  overflow-y: auto;
  flex: 1;
  transition: opacity 0.2s ease;
}

/* === Layer Tabs === */
.layer-tabs {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.tab-btn.active {
  background: #8B6914;
  color: white;
}

.tab-btn:hover:not(.active) {
  background: #f0f0f0;
}

/* === Filter Controls === */
.filter-section {
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.filter-section h3 {
  font-size: 14px;
  color: #5C3D1A;
  margin-bottom: 12px;
  font-weight: 600;
}

.filter-group {
  margin-bottom: 10px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #8B6914;
  box-shadow: 0 0 0 2px rgba(139, 105, 20, 0.15);
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-reset {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.btn-reset:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

/* === Result Counter === */
.result-counter {
  font-size: 13px;
  color: #666;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}

/* === Accommodation List === */
.accommodation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.accommodation-card {
  background: white;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #eee;
}

.accommodation-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-color: #8B6914;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-header h4 {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.card-details {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 12px;
  color: #555;
}

.card-distance {
  font-size: 11px;
  color: #888;
  margin-left: auto;
}

.card-special {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 0 4px 0;
}

.special-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.special-badge--kantor {
  background: #1565C0;
  color: #fff;
}

.special-badge--ppih {
  background: #E65100;
  color: #fff;
}

.empty-state {
  text-align: center;
  color: #999;
  padding: 30px;
  font-size: 13px;
}

/* === Legend === */
.legend {
  background: white;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.legend h3 {
  font-size: 13px;
  color: #5C3D1A;
  margin-bottom: 8px;
  font-weight: 600;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

/* === Map === */
#map {
  flex: 1;
  min-height: 400px;
}

/* === Info Window === */
.info-window {
  max-width: 280px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.info-header {
  padding: 10px 14px;
  border-radius: 6px 6px 0 0;
  margin: -8px -8px 0 -8px;
}

.info-header h3 {
  color: white;
  font-size: 14px;
  margin-bottom: 2px;
}

.info-badge {
  font-size: 11px;
  background: rgba(255,255,255,0.25);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
}

.info-body {
  padding: 10px 0 4px;
}

.info-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}

.info-label {
  font-weight: 600;
  color: #555;
  min-width: 70px;
}

.info-desc {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  line-height: 1.4;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header h1 {
    font-size: 15px;
  }

  .toggle-sidebar-btn {
    padding: 10px 16px;
    font-size: 24px;
    min-width: 48px;
    min-height: 44px;
  }

  .sidebar.hidden {
    width: 0;
    min-width: 0;
  }

  .main-container {
    flex-direction: column;
    position: relative;
  }

  .sidebar {
    position: absolute;
    top: 0;
    left: -360px;
    height: 100%;
    z-index: 1500;
    transition: left 0.3s ease;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
  }

  .sidebar.open {
    left: 0 !important;
  }

  #map {
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 100%;
    min-width: 0;
    left: -100%;
  }

  .sidebar.open {
    left: 0 !important;
  }
}

/* Rute legend (inline, di bawah dropdown rute) */
.rute-legend-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}
.rute-legend-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.rute-legend-section .legend-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

