/* ================================
   OOXOO iframe Map — FINAL CLEAN
   목적:
   - 빨간 봉/잔여 라인 완전 제거
   - 지도는 항상 부모 100% 채움
   - 오버레이는 레이아웃 영향 ❌
   - Leaflet 여백/잔재 방지
================================ */

/* 기본 리셋 */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* 루트 */
#map-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000; /* 지도 로딩 전 잔여 픽셀 방지 */
}

/* 지도 영역: 부모 정확히 100% */
#map {
  position: absolute;
  inset: 0;               /* top/right/bottom/left = 0 */
  width: 100%;
  height: 100%;
}

/* Leaflet 컨테이너 강제 고정 (얇은 라인/여백 방지 핵심) */
.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000;
}

/* ===== 오버레이 =====
   - absolute overlay
   - 공간 차지 ❌
   - 장식용 bar / border / shadow 전부 제거
*/
.map-overlay {
  position: absolute;
  z-index: 1000;

  background: rgba(0, 0, 0, 0.45);
  color: #fff;

  padding: 6px 10px;
  border-radius: 8px;

  font-size: 13px;
  line-height: 1.3;

  border: none !important;
  box-shadow: none !important;

  pointer-events: none; /* 지도 조작 방해 ❌ */
}

/* 위치 */
.map-overlay.top-left {
  top: 8px;
  left: 8px;
}

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

/* 텍스트 */
.loc-title {
  font-weight: 600;
}

.loc-sub {
  font-size: 12px;
  opacity: 0.85;
}

.radius {
  font-weight: 600;
}

/* ===== 안전장치 =====
   혹시 남아 있을 수 있는 pseudo 요소 완전 차단
*/
.map-overlay::before,
.map-overlay::after,
.loc-title::before,
.loc-title::after,
.loc-sub::before,
.loc-sub::after {
  content: none !important;
  display: none !important;
}
/* ===============================
 * MAP ATTRIBUTION (Leaflet / OSM)
 * =============================== */
.map-attribution {
  position: absolute;
  right: 6px;
  bottom: 6px;

  display: flex;
  align-items: center;
  gap: 6px;

  z-index: 9999;
  background: rgba(255, 255, 255, 0.65);
  padding: 3px 6px;
  border-radius: 4px;

  pointer-events: none;
}

/* OSM 로고 */
.map-attribution img {
  height: 14px;      /* 🔑 작게 */
  width: auto;
  opacity: 0.85;
}

/* Leaflet 텍스트 */
.map-attribution span {
  font-size: 11px;
  color: #666;
  opacity: 0.8;
}
/* =========================================================
   OOXOO Map — Mobile/Galaxy artifact hardening
   목적:
   - 일부 안드로이드(특히 Galaxy)에서 1px 검은 점/선이 남는 현상은
     "배경(#000) 노출" 또는 "레이아웃(상단 H1)로 인한 미세 틈"일 가능성이 큼.
   - 아래는 레거시 요소/레이아웃 영향을 0으로 만들고, 배경을 비검정으로 통일해
     시각적 잔상을 원천 차단합니다.
   ========================================================= */

/* (1) index.php 상단 H1이 레이아웃을 밀지 않도록 완전 숨김(SEO 텍스트는 유지) */
body > h1 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* (2) 루트/지도 배경을 순수 검정(#000)에서 탈피 → 미세 틈이 있어도 검은 점이 보이지 않게 */
#map-root,
#map,
.leaflet-container {
  background: #cfe7f5 !important;
}

/* (3) 루트를 viewport에 고정(iframe 내부 viewport 기준) */
#map-root {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* (4) 레거시 오버레이가 어떤 이유로든 주입되면 무조건 숨김 */
.map-overlay.top-left,
.map-overlay.top-right {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* (5) 커스텀 attribution 박스는 제거(Leaflet attribution 컨트롤을 사용) */
.map-attribution {
  display: none !important;
}

/* (6) GPU/서브픽셀 잔상 완화(안전한 수준) */
#map-root,
#map,
.leaflet-container,
.ooxoo-map-topbar,
.leaflet-control-attribution,
.ooxoo-traffic-status {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
