/* LEADTOLAB 제주 관광 데이터 BI - 공통 스타일 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
    --brand: #2563eb;
    --lv1: #22c55e;  /* 원활 */
    --lv2: #84cc16;  /* 원활(관심) */
    --lv3: #eab308;  /* 보통 */
    --lv4: #f97316;  /* 경계(혼잡) */
    --lv5: #dc2626;  /* 심각 */
}

html, body { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif; }
body { background-color: #f8fafc; color: #1f2937; -webkit-font-smoothing: antialiased; }

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f8fafc; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Glass */
.glass-panel { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); }

/* Leaflet 지도는 헤더/오버레이 아래에 위치하도록 stacking context 분리 */
.map-isolate { isolation: isolate; position: relative; z-index: 0; }
.custom-marker { text-align: center; background: none; border: none; }

/* Sidebar nav */
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: .5rem; color: #4b5563; font-size: .925rem; font-weight: 500; transition: background-color .15s, color .15s; }
.nav-link:hover { background: #f3f4f6; color: #111827; }
.nav-link.active { background: var(--brand); color: #fff; box-shadow: 0 4px 10px -2px rgba(37, 99, 235, .35); }
.nav-link .nav-icon { width: 1.25rem; text-align: center; }
.nav-badge { margin-left: auto; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 9999px; background: #f1f5f9; color: #94a3b8; }
.nav-link.active .nav-badge { background: rgba(255,255,255,.2); color: #fff; }

/* Card */
.bi-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.bi-card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.bi-card-hover:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(15, 23, 42, .12); border-color: #dbeafe; }

/* Filter buttons (관광지 검색) */
.filter-btn.active { background-color: #2563eb; color: white; border-color: #2563eb; }
.sit-btn.active { background-color: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.tab-btn.active { background: #fff; color: #2563eb; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Tooltip (info icon) */
.tip { position: relative; }
.tip .tip-body { position: absolute; right: 0; bottom: 100%; margin-bottom: .5rem; width: 18rem; padding: .75rem; background: #1f2937; color: #fff; font-size: .75rem; line-height: 1.6; border-radius: .5rem; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 40; font-weight: 400; box-shadow: 0 10px 20px rgba(0,0,0,.15); }
.tip:hover .tip-body { opacity: 1; }

/* Live dot */
@keyframes ping-soft { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 9999px; background: #ef4444; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 9999px; background: #ef4444; animation: ping-soft 1.4s ease-out infinite; }

/* ===================== 2026-11 UI 버그 수정 ===================== */
/* 레이아웃: 태블릿(768~1024px) 가로 스크롤 방지 */
html, body { max-width: 100%; overflow-x: hidden; }
main { min-width: 0; overflow-x: hidden; }

/* 배지: 한글이 '실시/간'처럼 세로로 깨지지 않도록 */
.bi-badge, .live-badge,
span[class*="rounded-full"], span[class*="rounded-md"], span[class*="rounded-lg"][class*="px-"], span[class*="rounded"][class*="py-0.5"] {
    white-space: nowrap; word-break: keep-all; flex-shrink: 0;
}

/* 관광지 검색: 카테고리 활성 버튼 (Tailwind hover 클래스보다 우선) */
.filter-btn.active, .filter-btn.active:hover {
    background-color: #2563eb !important; color: #ffffff !important; border-color: #2563eb !important;
}
.view-btn { width: 2rem; height: 2rem; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; color: #9ca3af; transition: background-color .15s, color .15s; }
.view-btn:hover { color: #2563eb; background: #eff6ff; }
.view-btn.active { color: #2563eb; background: #dbeafe; }

/* 관광지 검색: 결과 테이블 줄바꿈 방지 */
#poiTable th, #poiTable td, #poiTable .bi-badge { white-space: nowrap; word-break: keep-all; }

/* 상세 드로어 액션 버튼 활성 상태 */
.action-btn.active { background-color: #eff6ff !important; color: #1d4ed8 !important; border-color: #93c5fd !important; }
.action-btn.active i { color: #2563eb !important; }

/* 지도 팝업 */
.leaflet-popup-content { margin: 12px 14px; font-family: 'Pretendard', sans-serif; }
.leaflet-popup-content-wrapper { border-radius: 12px; }

/* 인쇄: 관광지 상세 리포트만 출력 */
@media print {
    body.print-detail > *:not(#detail-view) { display: none !important; }
    body.print-detail #detail-view { position: static !important; background: none !important; display: block !important; }
    body.print-detail #detail-panel { transform: none !important; width: 100% !important; height: auto !important; overflow: visible !important; box-shadow: none !important; }
    body.print-detail #detail-panel > div:first-child button { display: none !important; }
}

