/* Temdam live maps: the basemap is real MapLibre/OpenFreeMap data. */
.td-live-map {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 430px;
  overflow: hidden;
  background: #e9f1ee;
  border: 1px solid rgba(18, 59, 48, .18);
  border-radius: .65rem;
  contain: layout paint;
  isolation: isolate;
}

.td-live-map .maplibregl-map {
  width: 100%;
  height: 100%;
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.td-live-map[data-map-state="loading"]::after,
.td-live-map[data-map-state="error"]::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  padding: .5rem .75rem;
  color: #23483a;
  background: rgba(246, 250, 246, .9);
  border: 1px solid rgba(18, 59, 48, .16);
  border-radius: .35rem;
  box-shadow: 0 .4rem 1.2rem rgba(18, 59, 48, .1);
  content: "지도를 불러오는 중…";
  font-size: .82rem;
  font-weight: 700;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.td-live-map[data-map-state="error"]::after {
  content: "지도를 불러오지 못했습니다.";
}

.td-live-map .maplibregl-ctrl-top-right {
  top: .65rem;
  right: .65rem;
}

.td-live-map .maplibregl-ctrl-bottom-left {
  bottom: .55rem;
  left: .65rem;
}

.td-live-map .maplibregl-ctrl-bottom-right {
  right: .55rem;
  bottom: .45rem;
  max-width: calc(100% - 1.1rem);
}

.td-live-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(18, 59, 48, .18);
  border-radius: .38rem;
  box-shadow: 0 .35rem 1rem rgba(18, 59, 48, .12);
}

.td-live-map .maplibregl-ctrl-group button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-bottom: 0;
  background-color: #fff;
  line-height: 1;
}

.td-live-map .maplibregl-ctrl-scale {
  padding: .1rem .32rem;
  color: #23483a;
  background: rgba(250, 252, 248, .84);
  border-color: #23483a;
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: .62rem;
  line-height: 1.2;
}

.td-live-map .maplibregl-ctrl-attrib {
  max-width: 100%;
  padding: .14rem .35rem;
  color: #23483a;
  background: rgba(250, 252, 248, .86);
  border-radius: .25rem;
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: .62rem;
  line-height: 1.3;
  white-space: normal;
}

.td-live-map .maplibregl-ctrl-attrib a {
  color: #23483a;
}

.td-live-map .td-map-marker {
  display: grid;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  place-items: center;
  color: #15382d;
  background: #d8f45b;
  border: 2px solid #15382d;
  border-radius: 50%;
  box-shadow: 0 .3rem .75rem rgba(13, 44, 34, .27);
  cursor: pointer;
  font: 800 16px/1 "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  transition: background .16s ease, transform .16s ease;
}

.td-live-map .td-map-marker:hover,
.td-live-map .td-map-marker:focus-visible {
  background: #f0ff9c;
  outline: 3px solid rgba(216, 244, 91, .7);
  outline-offset: 3px;
}

.td-map-popup-shell .maplibregl-popup-content {
  min-width: 8rem;
  padding: .7rem .8rem;
  color: #19372e;
  border-radius: .42rem;
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.td-map-popup {
  display: grid;
  gap: .12rem;
}

.td-map-popup strong {
  font-size: .95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.td-map-popup span {
  color: #66736b;
  font-size: .75rem;
}

@media (max-width: 640px) {
  .td-live-map {
    height: 360px;
    border-radius: .48rem;
  }

  .td-live-map .maplibregl-ctrl-top-right {
    top: .45rem;
    right: .45rem;
  }

  .td-live-map .maplibregl-ctrl-bottom-left {
    bottom: .4rem;
    left: .45rem;
  }

  .td-live-map .maplibregl-ctrl-bottom-right {
    right: .4rem;
    bottom: .35rem;
  }

  .td-live-map .maplibregl-ctrl-attrib {
    max-width: 75%;
    font-size: .56rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-live-map .td-map-marker { transition: none; }
}

.td-live-map .maplibregl-popup-close-button { width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; border: 0; background: transparent; color: #123b30; font: 20px/32px sans-serif; }
