@charset "UTF-8";
/**
 * 대시보드형 주제도 공통 스타일
 * - 적용 대상: Coastal (해안매립 현황), Solar (태양광 발전사업)
 * - Dashboard Panel (우측 패널 + D3.js 차트)
 * - Theme Switcher (하단 Scene Panel) - Coastal 전용
 * - POI Labels (District POI) - Coastal 전용
 * - Detail Panel (상세정보)
 * - 공통 컴포넌트: 차트 툴팁, 정보 패널, 모달 상태
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --coastal-left-panel-width: 350px;
}

/* ========================================
   Dashboard Panel (Right Panel)
   ======================================== */

/* Tooltip */
.coastal-chart-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.coastal-chart-tooltip strong {
    font-weight: 600;
    color: #a8c6ff;
}

/* ========================================
   KRDS Modal Dashboard
   ======================================== */

/* 백드롭 숨기기 - 우측 패널 형태이므로 배경 어둡게 하지 않음 */
.krds-modal.state-dashboard .modal-back {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* KRDS Modal Dashboard Overrides for Chart Sizing */
section[data-conts="dashboard-1"].state-dashboard .item-box,
section[data-conts="dashboard-1"].state-dashboard .item-zone.graph {
    height: auto !important; /* Override fixed heights from core CSS */
    min-height: 220px !important; /* Ensure minimum space for the chart */
}

/* Modal Content Styling */
.krds-modal.state-dashboard .modal-conts {
    padding: 20px;
}

.krds-modal.state-dashboard .list-zone {
    margin-bottom: 24px;
    background: transparent;
}

.krds-modal.state-dashboard .item-box {
    background: transparent;
}

.krds-modal.state-dashboard .modal-conts .list-zone .item-box .item-zone.graph {
    height: auto !important; /* 차트 크기에 맞춰 높이 자동 조절 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

/* Section Titles */
.krds-modal.state-dashboard .sub-title {
    color: #a8c6ff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.krds-modal.state-dashboard .sub-title.pt0 {
    padding-top: 0;
}

/* Chart Styling */
.krds-modal.state-dashboard svg {
    display: block;
    margin: 0 auto;
}

/* Timelapse Controls */
.timelapse-controls {
    display: flex;
    gap: 4px;
}

.timelapse-play-button,
.timelapse-reset-button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.timelapse-play-button:hover,
.timelapse-reset-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.timelapse-reset-button {
    font-size: 11px;
}

/* Cylinder Chart Controls (Solar) */
.cylinder-controls {
    display: flex;
    gap: 4px;
}

.cylinder-toggle-button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.cylinder-toggle-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cylinder-toggle-button.active {
    background: rgba(78, 205, 196, 0.4);
    color: #4ECDC4;
}

/* ========================================
   Theme Switcher (Scene Panel)
   ======================================== */

/* Legacy panel hide (replaced by POI popup) */
#coastalDetailPanel {
    display: none !important;
}

:root {
    --scene-panel-left-offset: var(--coastal-left-panel-width, 12px);
}

/* Theme Card */
/* .theme-card {
    min-width: 140px;
    max-width: 140px;
    height: 70px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    transition: all 0.2s ease;
    flex-shrink: 0;
} */

/* .theme-card .scene-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
} */

.theme-card:hover .scene-image {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border-color: #2196F3;
}

.theme-card.selected .scene-image {
    border-color: #FFC107;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4);
}

/* Scene Name (inside image) */
.theme-card .scene-image .scene-name {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 60%,
        transparent 100%
    );
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    padding: 4px 2px 3px 2px;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin: 0;
    z-index: 10;
}

.theme-card.selected .scene-image .scene-name {
    color: #FFC107;
    font-weight: 700;
}

/* Scene Body Layout */
#sceneBody {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 6px 8px !important;
    overflow-x: auto;
    align-items: center;
    height: 100%;
}

.scene-panel .scene-header {
    display: none !important;
}

/* ========================================
   POI Labels
   ======================================== */

/* Coastal POI (individual) - opacity 모니터링용 */
.poi-container.disabled {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 0.3 !important;
}

/* District POI (grouped by region) */
.district-poi-container {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.district-poi-container:hover {
    transform: scale(1.1);
}

.district-poi-marker {
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.district-poi-container:hover .district-poi-marker {
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
}

.district-poi-label {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* ========================================
   Coastal Detail Panel (inline)
   ======================================== */
.coastal-detail-panel {
    position: relative;
    background: rgba(20, 20, 20, 0.95);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    padding: 16px;
    margin: 12px;
    z-index: 100;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coastal-panel-close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 24px;
    color: #aaa;
    transition: color 0.2s ease;
    line-height: 1;
    font-weight: 300;
}

.coastal-panel-close-btn:hover {
    color: white;
}

.coastal-panel-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    padding-right: 24px;
}

.coastal-panel-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coastal-panel-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    line-height: 1.6;
}

.coastal-panel-info-label {
    color: #aaa;
    font-weight: 500;
}

.coastal-panel-info-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
}

/* ========================================
   D3.js Chart Styles (from inline JS)
   ======================================== */
.krds-modal.state-dashboard svg .y-axis text {
    fill: #fff;
}

.krds-modal.state-dashboard svg .domain {
    display: none;
}

.krds-modal.state-dashboard svg .bar {
    cursor: pointer;
    transition: opacity 0.3s;
}

.krds-modal.state-dashboard svg .bar-label {
    fill: #fff;
    font-size: 10px;
    pointer-events: none;
}

.krds-modal.state-dashboard svg .arc path {
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
}

.krds-modal.state-dashboard svg .arc text {
    fill: #fff;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* ========================================
   Modal Display States (from inline JS)
   ======================================== */
.krds-modal.state-dashboard.modal-show {
    display: block !important;
}

.krds-modal.state-dashboard.modal-hidden {
    display: none !important;
}

/* ========================================
   Dashboard Button States
   ======================================== */
[data-btn="dashboard-1"].active {
    background-color: rgba(33, 150, 243, 0.3);
    border-color: #2196F3;
}

/* ========================================
   Scene Panel States
   ======================================== */
.scene-panel-wrap.active {
    display: block !important;
}

/* ========================================
   공통 스타일 (Solar와 공유)
   ======================================== */
/* 차트 툴팁 공통 클래스 */
.chart-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.chart-tooltip strong {
    font-weight: 600;
    color: #a8c6ff;
}

/* 정보 패널 공통 클래스 */
.panel-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    line-height: 1.6;
}

.panel-info-label {
    color: #aaa;
    font-weight: 500;
}

.panel-info-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
}
