/* =========================================================
   Base / Reset
   ========================================================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;

  background: #0b0b0b;
  font-family: 'Segoe UI', sans-serif;
}

/* =========================================================
   Map container
   ========================================================= */
#map {
  height: 100vh;
  width: 100vw;
  background: transparent;
}

/* =========================================================
   Left menu (filters + actions)
   ========================================================= */
#filter-menu {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;

  background: rgba(15, 15, 15, 0.9);
  color: #eee;

  padding: 15px;
  border-radius: 6px;

  border: 1px solid #867333;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

#filter-menu h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #867333;

  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================================================
   Category list items
   ========================================================= */
.filter-item {
  display: flex;
  align-items: center;

  margin: 8px 0;
  cursor: pointer;

  font-size: 13px;
  color: #ccc;
}

.filter-item:hover {
  color: #fff;
}

.filter-item input {
  margin-right: 10px;
  cursor: pointer;
}

.filter-icon-preview {
  width: 18px;
  height: 18px;
  margin-right: 10px;

  background: #4a4a4a;
  border-radius: 4px;
  padding: 2px;

  border: 1px solid #444;
  display: inline-block;
  vertical-align: middle;
}

/* Grey out icon preview when category is disabled */
.filter-item input:not(:checked) ~ .filter-icon-preview {
  filter: grayscale(1);
  opacity: 0.3;
}

/* Per-category POI count */
.poi-count {
  margin-left: auto;

  color: #867333;
  font-weight: 600;
  font-size: 12px;
  opacity: 0.95;
}

/* =========================================================
   Bottom map selector
   ========================================================= */
#map-selector {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  display: flex;
  gap: 12px;

  background: rgba(0,0,0,0.8);
  padding: 12px;
  border-radius: 50px;
  border: 1px solid #444;
}

.map-btn {
  background: #1a1a1a;
  color: #888;
  border: 1px solid #333;

  padding: 10px 20px;
  cursor: pointer;

  border-radius: 25px;
  transition: all 0.3s ease;

  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
}

.map-btn:hover {
  border-color: #867333;
  color: #eee;
}

.map-btn.active {
  background: #867333;
  color: #fff;
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(134, 115, 51, 0.6);
}

/* =========================================================
   POI marker icon wrapper (Leaflet divIcon)
   ========================================================= */
.poi-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;

  background: #4a4a4a;
  border-radius: 50%;

  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.poi-icon-wrapper img {
  width: 70%;
  height: 70%;
}

/* Visual state for checked POIs */
.poi-checked {
  filter: grayscale(1) brightness(0.5);
  opacity: 0.6 !important;
}

/* =========================================================
   Leaflet popup tweaks
   ========================================================= */
.leaflet-popup-content {
  font-size: 13px;
  text-align: center;
}

/* =========================================================
   Menu buttons
   ========================================================= */
.menu-btn {
  margin-top: 10px;
  width: 100%;

  background: none;
  border: 1px solid #444;
  color: #ccc;

  font-size: 11px;
  cursor: pointer;

  padding: 7px 10px;
  border-radius: 6px;
}

.menu-btn:hover {
  border-color: #867333;
  color: #eee;
}

.menu-btn.danger:hover {
  border-color: #EB5757;
}

/* =========================================================
   Modal (Export / Import)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.modal-card {
  position: relative;

  width: min(560px, 92vw);
  max-height: 84vh;

  margin: 8vh auto 0;
  overflow: auto;

  background: rgba(15,15,15,0.96);
  border: 1px solid #867333;
  border-radius: 10px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  color: #eee;

  padding: 14px;
}

@media (max-width: 520px) {
  .modal-card {
    margin: 5vh auto 0;
    max-height: 88vh;
    padding: 12px;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  margin-bottom: 8px;
}

.modal-header h3 {
  margin: 0;

  font-size: 14px;
  color: #867333;

  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-close {
  width: 36px;
  height: 36px;

  background: rgba(0,0,0,0.25);
  border: 1px solid #444;
  color: #eee;

  border-radius: 8px;
  cursor: pointer;

  font-size: 18px;
  line-height: 18px;
}

.modal-close:hover {
  border-color: #867333;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-section h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #eee;
}

.modal-divider {
  border: none;
  height: 1px;
  background: #2b2b2b;
  margin: 0;
}

.modal-primary {
  width: 100%;
  margin-top: 8px;

  background: #1a1a1a;
  border: 1px solid #444;
  color: #eee;

  padding: 10px;
  border-radius: 8px;

  cursor: pointer;
  font-weight: 600;
}

.modal-primary:hover {
  border-color: #867333;
}

.modal-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-summary {
  font-size: 12px;
  color: #ddd;

  background: rgba(0,0,0,0.25);
  border: 1px solid #2d2d2d;

  padding: 10px;
  border-radius: 8px;
  line-height: 1.35;
}

.modal-summary.subtle {
  color: #bbb;
}

.modal-file {
  width: 100%;
  color: #ddd;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 12px;
  color: #ccc;
  margin-top: 8px;
}

.modal-status {
  margin-top: 8px;
  font-size: 12px;
  color: #caa85a;
}