/* ===== Common ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow: hidden;
}

body.public-page {
  overflow: hidden;
}

/* ===== Site header (public map) ===== */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid #004d92;
  flex-shrink: 0;
  padding: 6px 0 4px;
  text-align: center;
}

.site-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.site-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.site-title a {
  text-decoration: none;
}

.site-title-blue { color: #004d92; }
.site-title-dot  { color: #f6b512; }

.site-subtitle {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: #004d92;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ===== Public map ===== */
body.public-page {
  display: flex;
  flex-direction: column;
}

#map {
  width: 100%;
  flex: 1;
  min-height: 0;
}

.admin-link {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  opacity: 0.8;
}

/* ===== Admin layout ===== */
.admin-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.admin-header {
  flex-shrink: 0;
}

.admin-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  overflow-y: auto;
  padding: 12px;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  font-size: 0.875rem;
}

.section-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-section {
  margin-bottom: 4px;
}

/* Map inside admin */
.map-main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.map-main #map {
  height: 100%;
}

/* Tool buttons active state */
.tool-btn.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

/* Marker list items */
.marker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin-bottom: 4px;
  background: white;
}

.marker-item .marker-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.marker-item .marker-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marker-item .marker-type {
  color: #6c757d;
  font-size: 0.75rem;
}

.marker-item-editing {
  border-color: #e67e22 !important;
  background: #fff8f0 !important;
}

.marker-info {
  cursor: pointer;
}

/* Type badges in popup */
.popup-content h6 {
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.popup-content p {
  margin-bottom: 4px;
  white-space: pre-wrap;
}

.popup-content img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 4px;
  margin-top: 6px;
  display: block;
  cursor: pointer;
}
