/* Map page — builds on index.css shared shell */

.app-shell.map-page-shell {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  /* Fill the viewport under body padding; leave room for fixed bottom nav */
  height: calc(100dvh - 40px);
  min-height: calc(100dvh - 40px);
  max-height: calc(100dvh - 40px);
  padding-bottom: 44px;
  margin-bottom: 0;
}

.map-stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.36);
  overflow: hidden;
  background: rgba(0, 54, 96, 0.42);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.map-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.map-overlay__hint,
.map-overlay__filter {
  color: #003660;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(255, 255, 255, 0.9);
}

.map-overlay__filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
  white-space: nowrap;
}

.map-overlay__filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #3173c6;
  cursor: pointer;
}

#map {
  width: 100%;
  height: 100%;
  background: #02132e;
}

.leaflet-control-attribution {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(49, 115, 198, 0.55) !important;
  font-family: "Dosis", sans-serif !important;
  font-weight: 600 !important;
}

.leaflet-control-attribution a {
  color: rgba(49, 115, 198, 0.65) !important;
}

.leaflet-control-zoom a {
  background: #003660 !important;
  color: var(--gold) !important;
  border-color: rgba(255, 215, 0, 0.35) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
  background: #002b4d !important;
}

.leaflet-popup-content-wrapper {
  background: #003660;
  color: var(--gold);
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.leaflet-popup-tip {
  background: #003660;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.leaflet-popup-content {
  margin: 14px 16px;
  font-family: "Dosis", sans-serif;
}

.map-popup__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
}

.map-popup__date {
  color: #fff8bf;
  font-weight: 800;
}

.map-popup__label {
  color: var(--gold);
}

.map-popup__text {
  margin: 0 0 12px;
  color: #fff8bf;
  font-weight: 650;
  line-height: 1.35;
  white-space: pre-wrap;
}

.map-popup__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #003660;
  font-weight: 900;
  text-decoration: none;
}

.special-pin-icon {
  cursor: pointer;
}

.special-pin {
  background: #003660;
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
  width: 118px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  line-height: 1.15;
}

.special-pin__title {
  font-weight: 900;
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.special-pin__img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  margin: 4px auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.28);
}

.special-pin__desc {
  font-size: 11px;
  color: #fff8bf;
  font-weight: 650;
  margin-bottom: 6px;
}

.special-pin__arrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--gold);
  margin: 0 auto;
}

@media (max-width: 600px) {
  .app-shell.map-page-shell {
    height: calc(100dvh - 20px);
    min-height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    padding-bottom: 45px;
  }

  .map-overlay {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 8px;
  }

  .map-overlay__hint,
  .map-overlay__filter {
    font-size: 0.9rem;
  }

  .map-stage {
    border-radius: 10px;
  }
}
