/* styles_worldmap.css — styling for the Leaflet world map page. */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #1f2a2f;
  font-family: "Georgia", serif;
  color: #fff;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #1f2a2f;
}

/* Back button (top-left, over the map) */
#back-button {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1100;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-family: "Georgia", serif;
  transition: background-color 0.15s, transform 0.25s ease;
}
#back-button:hover {
  background-color: rgba(63, 81, 181, 0.95);
}

/* Edit mode panel (bottom-left) */
#edit-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 1100;
  background-color: rgba(0, 0, 0, 0.82);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: "Georgia", serif;
  font-size: 14px;
  max-width: 340px;
  line-height: 1.4;
}
#edit-panel code {
  background-color: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", monospace;
}

/* Side info panel (replaces Leaflet popups) */
#info-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background-color: #2a363c;
  color: white;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.55);
  transform: translateX(-100%);
  transition: transform 0.28s ease-in-out;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  font-family: "Georgia", serif;
}
#info-panel.open {
  transform: translateX(0);
}

/* Shift the back button right when panel is open so it stays visible */
body.panel-open #back-button {
  transform: translateX(420px);
}

.info-panel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-family: inherit;
  transition: background-color 0.15s;
  z-index: 2;
}
.info-panel-close:hover {
  background: rgba(63, 81, 181, 0.95);
}

.info-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.info-panel-body::-webkit-scrollbar {
  width: 8px;
}
.info-panel-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.info-thematic {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-content {
  padding: 18px 22px 24px;
}

.info-title {
  margin: 0 0 14px 0;
  font-size: 26px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.info-description {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.info-citymap {
  display: block;
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: zoom-in;
  transition: transform 0.15s;
}
.info-citymap:hover {
  transform: scale(1.01);
}
.info-hint {
  font-size: 12px;
  opacity: 0.65;
  text-align: center;
  margin-top: 6px;
}

/* Leaflet zoom controls — tint to match the site */
.leaflet-control-zoom a {
  background-color: rgba(0, 0, 0, 0.7) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.leaflet-control-zoom a:hover {
  background-color: rgba(63, 81, 181, 0.95) !important;
}

/* Responsive: on narrow screens, panel takes full width */
@media (max-width: 600px) {
  #info-panel {
    width: 100%;
  }
  body.panel-open #back-button {
    transform: translateX(calc(100vw - 140px));
  }
}
