/* Custom styling for TerraMap DE – LiDAR & Boden */

/* Leaflet Container Setup - Neutral background to prevent black multiply void */
.leaflet-container {
  background-color: #f1f5f9;
  font-family: inherit;
}

/* Layer & Pane Styles */
.lidar-base-layer {
  mix-blend-mode: normal !important;
}

.lidar-overlay-layer {
  pointer-events: none;
}

/* Region Jump Pill */
.region-jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background-color: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.region-jump-pill:hover {
  background-color: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fef3c7;
}

.leaflet-control-zoom {
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-control-zoom a {
  background-color: rgba(15, 23, 42, 0.9) !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 16px !important;
  transition: all 0.15s ease;
}

.leaflet-control-zoom a:hover {
  background-color: #1e293b !important;
  color: #f59e0b !important;
}

.leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #94a3b8 !important;
  font-size: 9px !important;
  backdrop-filter: blur(4px);
  border-top-left-radius: 6px;
  padding: 2px 6px !important;
}

.leaflet-control-attribution a {
  color: #38bdf8 !important;
}

.leaflet-control-scale-line {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid #475569 !important;
  border-top: none !important;
  color: #f8fafc !important;
  font-size: 10px !important;
  font-family: monospace;
}

/* Header Buttons */
.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background-color: rgba(30, 41, 59, 0.7);
  border: 1px solid #334155;
  color: #cbd5e1;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.header-btn:hover {
  background-color: #334155;
  color: #ffffff;
  border-color: #475569;
}

.header-btn.active-btn {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

/* Map Quick Nav Floating Buttons */
.map-quick-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-quick-btn:hover {
  background-color: #1e293b;
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Basemap Option Cards */
.basemap-option {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}

.basemap-option:hover {
  background-color: rgba(30, 41, 59, 0.8);
  border-color: #475569;
}

.basemap-option.active {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.6);
}

.basemap-option.active .font-semibold {
  color: #fbbf24;
}

/* Overlay Cards */
.overlay-card {
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: border-color 0.15s ease;
}

.overlay-card:hover {
  border-color: rgba(100, 116, 139, 0.6);
}

/* Custom Checkbox */
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.3rem;
  border: 1.5px solid #64748b;
  background-color: #1e293b;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-checkbox:checked {
  background-color: #f59e0b;
  border-color: #f59e0b;
}

.custom-checkbox:checked::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0.85);
  background-color: #0f172a;
}

/* Custom Range Slider */
.layer-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: #334155;
  outline: none;
  cursor: pointer;
}

.layer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}

.layer-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.layer-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Feature Info Table */
.feature-info-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 11px;
}

.feature-info-table th {
  background-color: #1e293b;
  color: #38bdf8;
  padding: 5px 8px;
  text-align: left;
  border: 1px solid #334155;
}

.feature-info-table td {
  padding: 5px 8px;
  border: 1px solid #334155;
  color: #e2e8f0;
}

.feature-info-table tr:nth-child(even) {
  background-color: rgba(30, 41, 59, 0.4);
}

/* Archaeological Map Pins */
.archaeo-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.archaeo-pin:hover {
  transform: scale(1.25);
  z-index: 1000 !important;
}

.archaeo-pin-tumulus {
  background: linear-gradient(135deg, #e11d48, #9f1239);
}

.archaeo-pin-wall {
  background: linear-gradient(135deg, #d97706, #92400e);
}

.archaeo-pin-megalith {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

/* GPS User Marker & Direction Cone */
.gps-user-pulse {
  animation: gpsPulse 2s infinite ease-out;
}

@keyframes gpsPulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Floating GPS FAB Button (Mobile & Desktop) */
.fab-gps-btn {
  position: absolute;
  bottom: 5.5rem;
  right: 0.85rem;
  z-index: 25;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background-color: rgba(15, 23, 42, 0.92);
  border: 2px solid rgba(16, 185, 129, 0.6);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.fab-gps-btn:hover {
  transform: scale(1.08);
  border-color: #10b981;
  color: #34d399;
}

.fab-gps-btn:active {
  transform: scale(0.95);
}

.fab-gps-btn.tracking {
  background-color: #064e3b;
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
}

.gps-fab-ring {
  display: none;
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2px solid #34d399;
  animation: gpsPulse 2s infinite ease-out;
  pointer-events: none;
}

.fab-gps-btn.tracking .gps-fab-ring {
  display: block;
}

/* Category Section Accordions in Drawer */
.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0;
  user-select: none;
}
