:root #leaflet-tracker-app {
  --brand-blue: #051E40;
  --brand-blue-light: #0A2E63;
  --brand-blue-border: #163B73;

  --bg-main: #111;
  --bg-panel: rgba(5, 30, 64, 0.96);
  --bg-section: #091A33;

  --text-main: #fff;
  --text-muted: #bbb;

  --success: #00c853;
  --warning: #ff9900;
  --danger: #ff3333;
}

/*
|--------------------------------------------------------------------------
| BASE
|--------------------------------------------------------------------------
*/
#leaflet-tracker-app {
  position: relative;
  height: 90vh;
  transition: height 0.3s ease, width 0.3s ease;
}

#leaflet-tracker-app.fullscreen {
  height: 100vh;
  width: 100vw;
}

#leaflet-tracker-app #map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background 0.2s ease;
  color: #fff;
  font-size: 16px;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  opacity: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
}

#leaflet-tracker-app #map-overlay:hover {
  background: rgba(0, 0, 0, 0.15);
  opacity: 1;
}

#leaflet-tracker-app #map-overlay.fullscreen-active {
  background: transparent;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 1;
}

#leaflet-tracker-app #map-overlay-close-btn {
  pointer-events: all;
  cursor: pointer;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  padding: 8px;
  box-sizing: content-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

#leaflet-tracker-app #map-overlay-close-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

#leaflet-tracker-app #map-overlay-close {
  pointer-events: none;
  width: 36px;
  height: 36px;
  fill: #fff;
}

#leaflet-tracker-app #map {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg-main);
}

body #leaflet-tracker-app {
  font-family: Arial, sans-serif;
}

#leaflet-tracker-app #map {
  z-index: 1;
}

/*
|--------------------------------------------------------------------------
| PANEL
|--------------------------------------------------------------------------
*/

#leaflet-tracker-app .panel {
  position: absolute;
  top: 11px;
  left: 53px;

  width: 620px;
  max-height: calc(100vh - 120px);

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: none;
  -ms-overflow-style: none;

  padding: 16px;

  z-index: 9999;

  color: #fff;
  background: var(--bg-panel);

  border: 1px solid var(--brand-blue-border);
  border-radius: 4px;

  transition: all 0.4s ease-in-out;
}

#leaflet-tracker-app .panel::-webkit-scrollbar {
  display: none;
}

#leaflet-tracker-app .panel h1 {
  margin-top: 0;
  font-size: 22px;
  color: #FFF;
}

#leaflet-tracker-app .panel h3 {
  margin-top: 0;
  font-size: 22px;
  color: #FFF;
}

#leaflet-tracker-app .panel.collapsed {
  transform: translateX(-629px);
  top: 90px;
}

#leaflet-tracker-app .panel.collapsed .panel-toggle {
  top: 0;
  right: 0;
}

#leaflet-tracker-app .panel-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  transition: all 0.4s ease-in-out;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  background: var(--brand-blue);

  border: 1px solid var(--brand-blue-border);
  border-left: none;

  border-radius: 0 8px 8px 0;

  font-size: 18px;
  color: white;

  user-select: none;
}

#leaflet-tracker-app .panel-toggle:hover {
  background: var(--brand-blue-light);
}

/*
|--------------------------------------------------------------------------
| BUTTONS
|--------------------------------------------------------------------------
*/

#leaflet-tracker-app .mode-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#leaflet-tracker-app button {
  padding: 10px 14px;

  cursor: pointer !important;

  color: #fff;
  background: var(--brand-blue) !important;
  border: 1px solid var(--brand-blue-border);
  border-radius: 6px !important;
}

#leaflet-tracker-app button:hover {
  background: var(--brand-blue-light) !important;
  color: #FFF !important;
}

#leaflet-tracker-app button.active {
  background: var(--brand-blue-light) !important;
  border-color: #4f7cc9 !important;
}

#leaflet-tracker-app .button-warning {
  background: #663300;
  border-color: #ff9900;
}

#leaflet-tracker-app .button-danger {
  background: #660000;
  border-color: #aa0000;
}

/*
|--------------------------------------------------------------------------
| FORM ELEMENTS
|--------------------------------------------------------------------------
*/

#leaflet-tracker-app textarea,
#leaflet-tracker-app input {
  width: 100%;
  box-sizing: border-box;

  padding: 8px;

  color: #fff;
  background: #000;

  border: 1px solid #444;
  border-radius: 4px;
}

#leaflet-tracker-app textarea {
  resize: vertical;
}

#leaflet-tracker-app #config-output {
  height: 150px;

  color: #00ff66;

  padding: 10px;

  font-family: monospace;
  font-size: 12px;
  
  overflow: hidden;
}

#leaflet-tracker-app #notes-input {
  height: 120px;
}

/*
|--------------------------------------------------------------------------
| PANELS
|--------------------------------------------------------------------------
*/

#leaflet-tracker-app .stats,
#leaflet-tracker-app .editor-panel,
#leaflet-tracker-app .leaderboard-panel {
  margin-top: 12px;
  padding: 12px;

  background: var(--bg-section);
  border: 1px solid var(--brand-blue-border);
  border-radius: 6px;
}

#leaflet-tracker-app .hidden {
  display: none !important;
}

/*
|--------------------------------------------------------------------------
| TEXT
|--------------------------------------------------------------------------
*/

#leaflet-tracker-app .status {
  margin-top: 12px;

  color: #ccc;
  font-size: 14px;
}

#leaflet-tracker-app .legend {
  margin-top: 12px;

  line-height: 1.7;
  font-size: 13px;

  color: #bbb;
}

#leaflet-tracker-app .form-label {
  display: block;

  margin-bottom: 6px;

  font-size: 13px;
}

#leaflet-tracker-app .form-group {
  margin-bottom: 12px;
}

/*
|--------------------------------------------------------------------------
| LEADERBOARD
|--------------------------------------------------------------------------
*/

#leaflet-tracker-app .unassigned-warning {
  margin-top: 14px;
  padding: 10px;

  color: #ffcc66;
  background: #442200;

  border: 1px solid #aa6600;
  border-radius: 6px;
}

#leaflet-tracker-app .leaderboard-entry {
  margin-bottom: 10px;
}

@media (max-width: 991.98px) {
  #leaflet-tracker-app {
    height: unset;
  }
  #leaflet-tracker-app #map-overlay {
    height: 90vh;
  }
  #leaflet-tracker-app #map {
    position: relative;
    height: 90vh;
  }
  #leaflet-tracker-app .panel {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-height: unset;
    overflow: unset;
    border-radius: 0;
  }
  #leaflet-tracker-app .panel-toggle {
    display: none
  }
}