/* ============================================================
   Trail Signal — Application Styles
   ============================================================ */

/* --- Reset & full-screen map -------------------------------- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: #e0e0e0;
}

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


/* ============================================================
   Layer Switcher
   ============================================================ */

.layer-switcher {
  position: relative;
}

.layer-switcher-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.85);
  color: #e0e0e0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.layer-switcher-toggle:hover {
  background: rgba(40, 40, 40, 0.95);
}

.layer-switcher-toggle--active {
  background: rgba(50, 50, 50, 0.95);
}

.layer-switcher-panel {
  background: rgba(26, 26, 26, 0.85);
  border-radius: 8px;
  color: #e0e0e0;
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.25s ease, opacity 0.25s ease;
  display: none;
}

.layer-switcher-panel--open {
  display: block;
}

.layer-switcher-title {
  padding: 10px 14px 6px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9e9e9e;
}

/* --- Category headers --- */

.layer-switcher-category {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.layer-switcher-category:last-child {
  border-bottom: none;
}

.layer-switcher-category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
  transition: background 0.15s ease;
}

.layer-switcher-category-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.layer-switcher-arrow {
  display: inline-block;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.layer-switcher-arrow--collapsed {
  transform: rotate(-90deg);
}

/* --- Category body (layer list) --- */

.layer-switcher-category-body {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.layer-switcher-category-body--collapsed {
  max-height: 0;
}

/* --- Individual layer items --- */

.layer-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 26px;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.layer-switcher-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.layer-switcher-checkbox,
.layer-switcher-radio {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #4caf50;
  cursor: pointer;
}

.layer-switcher-label {
  font-size: 14px;
  line-height: 1.3;
}


/* ============================================================
   Operator Filter
   ============================================================ */

.operator-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: rgba(26, 26, 26, 0.85);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.operator-filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: transparent;
  color: #bdbdbd;
  padding: 6px 16px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.operator-filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.operator-filter-chip--active {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
}

.operator-filter-chip--active:hover {
  background: #43a047;
}


/* ============================================================
   Legend
   ============================================================ */

.legend {
  position: relative;
}

.legend-toggle {
  display: block;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.85);
  color: #e0e0e0;
  padding: 8px 14px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.legend-toggle:hover {
  background: rgba(40, 40, 40, 0.95);
}

.legend-toggle--active {
  background: rgba(50, 50, 50, 0.95);
}

.legend-panel {
  background: rgba(26, 26, 26, 0.85);
  border-radius: 8px;
  color: #e0e0e0;
  padding: 12px 14px;
  min-width: 200px;
  max-width: 260px;
  max-height: 60vh;
  overflow-y: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.25s ease, opacity 0.25s ease;
  display: none;
}

.legend-panel--open {
  display: block;
}

/* --- Legend panel header with close button --- */

.legend-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e0e0e0;
}

.legend-panel-close {
  border: none;
  background: none;
  color: #9e9e9e;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legend-panel-close:hover {
  color: #e0e0e0;
}

/* --- Legend sections --- */

.legend-section {
  margin-bottom: 14px;
}

.legend-section:last-child {
  margin-bottom: 0;
}

.legend-section-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9e9e9e;
  margin-bottom: 8px;
}

.legend-section-title--clickable {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.legend-section-title--clickable:hover {
  color: #e0e0e0;
}

.legend-section-arrow {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.2s ease;
  transform: rotate(90deg);
}

.legend-section-arrow--collapsed {
  transform: rotate(0deg);
}

/* --- Gradient bars --- */

.legend-gradient-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-gradient {
  height: 12px;
  border-radius: 3px;
  width: 100%;
}

.legend-gradient-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #bdbdbd;
}

/* --- Path type list --- */

.legend-path-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-path-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-path-item svg {
  flex-shrink: 0;
}

.legend-path-label {
  font-size: 13px;
}

.legend-opacity-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.legend-opacity-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.legend-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.legend-opacity-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

.legend-opacity-pct {
  font-size: 11px;
  color: #9e9e9e;
  min-width: 30px;
  text-align: right;
}

.legend-note {
  font-size: 10px;
  color: #888;
  font-style: italic;
  margin-top: 4px;
  line-height: 1.3;
}


/* ============================================================
   Attribution Bar
   ============================================================ */

/* Lift bottom controls above the attribution footer */
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  padding-bottom: 28px !important;
}

.attribution-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  background: rgba(26, 26, 26, 0.75);
  color: #bdbdbd;
  font-size: 11px;
  padding: 4px 10px;
  z-index: 5;
  line-height: 1.4;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.attribution-bar a {
  color: #90caf9;
  text-decoration: none;
}

.attribution-bar a:hover {
  text-decoration: underline;
}

.attribution-version {
  margin-left: auto;
  font-size: 10px;
  color: #9e9e9e;
  white-space: nowrap;
  padding-left: 10px;
}

.attribution-toggle {
  display: none;
  background: none;
  border: none;
  color: #bdbdbd;
  font-size: 11px;
  cursor: pointer;
  padding: 0 4px;
}


/* ============================================================
   Popup
   ============================================================ */

.maplibregl-popup-content {
  background: rgba(30, 30, 30, 0.92);
  color: #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  max-width: 280px;
}

.maplibregl-popup-close-button {
  color: #9e9e9e;
  font-size: 18px;
  padding: 4px 8px;
}

.maplibregl-popup-close-button:hover {
  color: #fff;
  background: transparent;
}

.maplibregl-popup-tip {
  border-top-color: rgba(30, 30, 30, 0.92);
}


/* ============================================================
   Search / Geocoding
   ============================================================ */

.search-control {
  position: relative;
}

.search-input {
  width: 220px;
  padding: 8px 12px;
  min-height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.85);
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.search-input::placeholder {
  color: #9e9e9e;
}

.search-input:focus {
  background: rgba(30, 30, 30, 0.95);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.4);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: rgba(26, 26, 26, 0.95);
  border-radius: 8px;
  overflow: hidden;
  z-index: 10;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.search-result-item {
  padding: 10px 12px;
  font-size: 13px;
  color: #e0e0e0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-empty {
  color: #9e9e9e;
  cursor: default;
}

.search-result-empty:hover {
  background: transparent;
}


/* ============================================================
   GPX Import
   ============================================================ */

.gpx-import {
  position: relative;
}

.gpx-import-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.85);
  color: #e0e0e0;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}

.gpx-import-btn:hover {
  background: rgba(40, 40, 40, 0.95);
  color: #fff;
}

/* Drag-and-drop overlay */
.gpx-drop-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 125, 36, 0.15);
  border: 3px dashed rgba(76, 175, 80, 0.6);
  border-radius: 8px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gpx-drop-overlay--active {
  opacity: 1;
}

.gpx-drop-overlay-text {
  background: rgba(26, 26, 26, 0.9);
  color: #4caf50;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
}

/* Import message variants */
.gpx-import-message--success {
  color: #a5d6a7 !important;
}

.gpx-import-message--warn {
  color: #ffd54f !important;
}

.gpx-import-message--error {
  color: #ef9a9a !important;
}


/* ============================================================
   Admin Link (gear icon)
   ============================================================ */

.admin-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.85);
  color: #e0e0e0;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}

.admin-link-btn:hover {
  background: rgba(40, 40, 40, 0.95);
  color: #fff;
}


/* ============================================================
   User-friendly error / status messages
   ============================================================ */

.app-message {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  background: rgba(26, 26, 26, 0.92);
  color: #ffd54f;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-message--visible {
  opacity: 1;
}


/* ============================================================
   Mobile Responsive  (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {

  /* --- Layer switcher: slide-out panel on mobile (standalone mode) --- */

  .layer-switcher-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: 100vh;
    border-radius: 0 8px 8px 0;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    display: block;
  }

  .layer-switcher-panel--open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    display: block;
  }

  /* --- Legend: bottom sheet on mobile (standalone mode) --- */

  .legend-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    max-height: 50vh;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    display: block;
  }

  .legend-panel--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    display: block;
  }

  /* --- Attribution: collapsible on mobile --- */

  .attribution-toggle {
    display: inline;
  }

  .attribution-bar .attribution-text {
    display: none;
  }

  .attribution-bar.attribution-bar--expanded .attribution-text {
    display: inline;
  }
}


/* ============================================================
   MapLibre built-in controls (zoom, compass, geolocate)
   ============================================================ */

html, body {
  background: #121212;
}

.maplibregl-ctrl-group {
  background: rgba(26, 26, 26, 0.85) !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.maplibregl-ctrl-group button {
  background-color: transparent !important;
  width: 40px !important;
  height: 40px !important;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.maplibregl-ctrl-group button:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Make the +/- and compass icons white */
.maplibregl-ctrl-group button > .maplibregl-ctrl-icon,
.maplibregl-ctrl button > .maplibregl-ctrl-icon,
.maplibregl-ctrl-zoom-in > .maplibregl-ctrl-icon,
.maplibregl-ctrl-zoom-out > .maplibregl-ctrl-icon,
.maplibregl-ctrl-compass > .maplibregl-ctrl-icon,
.maplibregl-ctrl-geolocate > .maplibregl-ctrl-icon {
  filter: invert(1) !important;
}

/* Geolocate active state (tracking) */
.maplibregl-ctrl-geolocate-active > .maplibregl-ctrl-icon {
  filter: invert(1) brightness(1.5) !important;
}

/* Version badge */
.version-badge {
  background: rgba(26, 26, 26, 0.6) !important;
  color: #9e9e9e !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  pointer-events: none;
  user-select: none;
}

/* Scale bar */
.maplibregl-ctrl-scale {
  background: rgba(26, 26, 26, 0.7) !important;
  color: #e0e0e0 !important;
  border-color: #e0e0e0 !important;
  font-size: 11px !important;
  border-radius: 3px;
}


/* ============================================================
   Sliding Sidebars (Left & Right)
   ============================================================ */

/* --- Toggle buttons (hamburger / chevron) --- */

.sidebar-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.6);
  color: #e0e0e0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease;
  z-index: 2;
}

.sidebar-toggle:hover {
  background: rgba(40, 40, 40, 0.85);
}

.sidebar-toggle--active {
  background: rgba(50, 50, 50, 0.9);
}

/* --- Overlay (click-to-close, behind panel) --- */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* --- Sliding panels --- */

.sidebar-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.6);
  color: #e0e0e0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar-panel-left {
  left: 0;
  width: 50vw;
  max-width: 400px;
  border-radius: 0 12px 12px 0;
  transform: translateX(-100%);
}

.sidebar-panel-left--open {
  transform: translateX(0);
}

.sidebar-panel-right {
  right: 0;
  width: 320px;
  max-width: 85vw;
  border-radius: 12px 0 0 12px;
  transform: translateX(100%);
}

.sidebar-panel-right--open {
  transform: translateX(0);
}

/* --- Panel header --- */

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-close {
  border: none;
  background: none;
  color: #9e9e9e;
  font-size: 26px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-close:hover {
  color: #e0e0e0;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Scrollable content area --- */

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

/* --- Collapsible sections --- */

.sidebar-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
  transition: background 0.15s ease;
}

.sidebar-section-title:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-section-arrow {
  display: inline-block;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.sidebar-section-arrow--open {
  transform: rotate(90deg);
}

.sidebar-section-body {
  padding: 0 16px 12px;
}

/* --- Operator filter chips inside sidebar: no extra background --- */

.sidebar-section-body .operator-filter {
  background: none;
  padding: 4px 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* --- Layer switcher content inside sidebar: strip wrappers --- */

.sidebar-section-body .layer-switcher-panel {
  background: none;
  border-radius: 0;
  min-width: unset;
  max-height: unset;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: block;
  padding: 0;
}

.sidebar-section-body .layer-switcher-category {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section-body .layer-switcher-category:last-child {
  border-bottom: none;
}

.sidebar-section-body .layer-switcher-category-header {
  padding: 8px 0;
}

.sidebar-section-body .layer-switcher-item {
  padding: 6px 0 6px 16px;
}

/* --- Legend content inside sidebar: strip wrappers --- */

.sidebar-section-body .legend-panel {
  background: none;
  border-radius: 0;
  min-width: unset;
  max-width: unset;
  max-height: unset;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: block;
  padding: 0;
}

/* --- Search inside sidebar --- */

.sidebar-section-body .search-content {
  position: relative;
}

.sidebar-section-body .search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar-section-body .search-results {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(26, 26, 26, 0.95);
  z-index: 60;
}

/* --- GPX import inside sidebar --- */

.sidebar-section-body .gpx-import-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-section-body .gpx-import-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* --- Admin link inside sidebar --- */

.sidebar-admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e0e0e0;
  text-decoration: none;
  padding: 8px 0;
  font-size: 14px;
  transition: color 0.15s ease;
}

.sidebar-admin-link:hover {
  color: #90caf9;
}

/* --- Reset button --- */

.sidebar-reset-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 16px 16px 20px;
  padding: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #9e9e9e;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  border-color: rgba(255, 255, 255, 0.25);
}

.sidebar-reset-btn:active {
  background: rgba(255, 255, 255, 0.14);
}

/* --- Hide old standalone controls when sidebars are active --- */
/* These classes prevent double-rendering if controls are still
   added standalone AND inside sidebar. Typically only one is used. */

/* --- Mobile sidebar adjustments --- */

@media (max-width: 768px) {
  .sidebar-panel-left {
    width: 85vw;
    max-width: 360px;
  }

  .sidebar-panel-right {
    width: 85vw;
    max-width: 320px;
  }
}
