/*
 * 계열사 위치 안내 칸 (js/affiliate-map.js) — 계열사 목록에서 법인을 누르면 그 줄 바로 아래에 펼쳐지는 칸.
 *  - 왼쪽 남색 주소 카드는 오시는 길의 .tit_box · .location-actions 모양을 그대로 쓰고, 여기서는 칸의 배치만 정한다.
 *  - 색은 theme-navy.css 의 --tn-* 값만 쓴다.
 */

/* 목록의 법인 줄: 누를 수 있다는 것을 알린다. 펼쳐진 줄은 안내 문구가 '접기'로 바뀐다. */
.affiliate-entry[role="button"] { cursor: pointer; }
.affiliate-entry[role="button"]:focus-visible { outline: 2px solid var(--tn-ink); outline-offset: 2px; }
.affiliate-entry[role="button"] > div::after { content: "위치 · 연락처 보기 ↓"; display: block; margin-top: 8px; font-size: 12px; color: var(--tn-muted); }
.affiliate-entry[role="button"]:hover > div::after { color: var(--tn-red); }
.affiliate-entry[aria-expanded="true"] > div::after { content: "접기 ↑"; color: var(--tn-red); }
.inside-2026 .affiliate-entry[aria-expanded="true"] { background: var(--tn-mist); }

/* 펼쳐지는 칸: 목록이 몇 칸으로 나뉘어 있든 한 줄을 통째로 쓴다. 왼쪽 주소 카드, 오른쪽 지도. */
.affiliate-location { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); border: 1px solid var(--tn-line); border-radius: 8px; overflow: hidden; background: #fff; animation: affiliate-location-in .35s ease-out; }
.affiliate-location[hidden] { display: none; }
/* 지역 고르기·검색으로 펼쳐 둔 법인이 목록에서 빠지면 안내 칸도 함께 감춘다 */
.affiliate-entry[hidden] + .affiliate-location { display: none; }
@keyframes affiliate-location-in { from { opacity: 0; transform: translateY(-8px); } }
@media (min-width: 901px) { .affiliate-location { margin: 16px 0 24px; } }   /* 한 줄 목록에서는 위아래 줄과 띄운다 */
@media (prefers-reduced-motion: reduce) { .affiliate-location { animation: none; } }

/* 왼쪽 주소 카드: 칸 안에서는 모서리를 칸에 맞추고, 긴 법인명·주소가 넘치지 않게 한다 */
.inside-2026 .affiliate-location .tit_box { border-radius: 0; }
.affiliate-location .tit_box h4 { margin-top: 20px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; line-height: 1.3; letter-spacing: -.035em; color: #fff; word-break: keep-all; }
.affiliate-location .tit_box address { margin: 18px 0; font-size: 15px; word-break: keep-all; }
.inside-2026 .affiliate-location .location-actions { margin-top: 24px; }

/* 대표번호: 누르면 바로 전화가 걸린다 */
.affiliate-location-tel { display: flex; align-items: baseline; gap: 14px; color: #fff; }
.affiliate-location-tel[hidden] { display: none; }
.affiliate-location-tel span { font-size: 13px; color: var(--tn-on-navy); }
.affiliate-location-tel strong { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }

/* 오른쪽 지도 */
.affiliate-location-map { min-height: 420px; background: var(--tn-mist); }
.affiliate-location-map :is(.map_box, .map-fallback) { width: 100%; height: 100%; min-height: inherit; }
.affiliate-location-map [hidden] { display: none; }

/* 좁은 화면: 주소 카드 아래에 지도를 쌓는다 */
@media (max-width: 760px) {
  .affiliate-location { grid-template-columns: 1fr; }
  .affiliate-location-map { min-height: 300px; }
}

/* #법인id 로 바로 들어왔을 때 고정 헤더 아래에서 멈추도록 */
.affiliate-entry[id] { scroll-margin-top: 100px; }

/* 지도를 못 불러왔을 때 안내 한 줄 */
.map-fallback-note { display: block; margin-top: 10px; color: var(--tn-muted); font-size: 13px; line-height: 1.6; }
