/* ===============================
   BASE
   =============================== */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===============================
   MAP LAYOUT
   =============================== */

#map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ===============================
   SIDEBAR (overlay)
   =============================== */

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100%;
  background: #fafafa;
  border-right: 1px solid #ddd;
  box-sizing: border-box;
  z-index: 10;
  transform: translateX(0);
  transition: transform 0.25s ease;
  pointer-events: auto;
}

#sidebar.closed {
  transform: translateX(-320px);
}

#sidebar-content {
  height: 100%;
  overflow-y: auto;
  padding: 12px;
}

/* ===============================
   TOGGLE BUTTON
   =============================== */

#sidebar-toggle {
  position: fixed;
  top: 10px;
  left: 320px;
  z-index: 9999;
  background: white;
  border: 1px solid #ccc;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.25s ease, left 0.25s ease;
}

#sidebar.closed + #sidebar-toggle {
  left: 0;
  transform: rotate(180deg);
}

/* ===============================
   SIDEBAR HEADER
   =============================== */

#sidebar-header {
  margin-bottom: 8px;
}

#sidebar-header h2 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

#search-bar {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* ===============================
   FILTERS
   =============================== */

.filter-group {
  margin-bottom: 16px;
}

details.filter-group summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
}

.checkbox-container {
  margin-left: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
  font-size: 0.85rem;
}

.checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* ===============================
   ORG LIST
   =============================== */

#org-list {
  margin-top: 8px;
}

.org-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.org-item:hover {
  background: #f0f0f0;
}

.org-name {
  font-weight: bold;
}

.org-meta {
  font-size: 12px;
  color: #666;
}

/* ===============================
   POPUP
   =============================== */

.popup {
  font-size: 13px;
  line-height: 1.35;
}

.popup-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.popup-address {
  margin-bottom: 6px;
}

.popup-meta div {
  margin-bottom: 2px;
}

.popup-link {
  display: inline-block;
  margin-top: 6px;
}

.popup-social {
  margin-top: 6px;
  font-size: 12px;
}

.popup-summary {
  margin-top: 8px;
  font-size: 12px;
}

.popup-verify {
  margin-top: 10px;
  font-size: 12px;
}