/* ═══════════════════════════════════════════════════════════════════
   실시간 상권현황 (/market-insight/realtime) 전용 스타일
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 상단 바 ──────────────────────────────────────────────────── */
.mi-rt-topbar {
    position: relative;
    z-index: 20;
}

/* ─── 프로그레스 바 (하단 고정) ─────────────────────────────── */
.mi-rt-progress-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid #bfdbfe;
    padding: 10px 20px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.mi-rt-progress-inner {
    max-width: 600px;
    margin: 0 auto;
}

.mi-rt-progress-wrap .progress {
    background: #e2e8f0;
    border-radius: 3px;
}

/* ─── 레이아웃: 지도 + 사이드바 ─────────────────────────────── */
.mi-rt-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: calc(100vh - 140px);
    min-height: 600px;
}

.mi-rt-map-wrap {
    position: relative;
    overflow: hidden;
}

.mi-rt-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.mi-rt-sidebar {
    overflow-y: auto;
    border-left: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ─── 범례 ──────────────────────────────────────────────────── */
.mi-rt-legend {
    position: absolute;
    bottom: 20px;
    left: 10px;
    z-index: 5;
}

.mi-rt-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── KPI 카드 ──────────────────────────────────────────────── */
.mi-rt-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mi-rt-kpi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.mi-rt-kpi-label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 2px;
}

.mi-rt-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.mi-rt-kpi-danger .mi-rt-kpi-value { color: #ef4444; }
.mi-rt-kpi-warning .mi-rt-kpi-value { color: #f97316; }
.mi-rt-kpi-success .mi-rt-kpi-value { color: #22c55e; }

/* ─── 카드 ──────────────────────────────────────────────────── */
.mi-rt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.mi-rt-card-header {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.mi-rt-card-body {
    padding: 12px 14px;
}

/* ─── CTA 카드 ─────────────────────────────────────────────── */
.mi-rt-cta {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-color: #93c5fd;
}

/* ─── 지도 마커 ────────────────────────────────────────────── */
.mi-rt-map-marker {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 2px solid #94a3b8;
    border-radius: 20px;
    padding: 3px 10px 3px 6px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
    font-size: 11px;
}

.mi-rt-map-marker:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10;
}

.mi-rt-marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.mi-rt-marker-label {
    font-weight: 600;
    color: #1e293b;
}

/* ─── 상세 모달 ────────────────────────────────────────────── */
.mi-rt-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    overflow-y: auto;
}

.mi-rt-modal-content {
    background: #fff;
    border-radius: 14px;
    width: 400px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}

.mi-rt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 14px 14px 0 0;
    z-index: 2;
}

.mi-rt-modal-body {
    padding: 14px 18px 18px;
}

/* 차트 컨테이너 고정 높이 */
.mi-rt-modal-body .mi-rt-chart-wrap {
    position: relative;
    height: 160px;
}

.mi-rt-modal-body .mi-rt-chart-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* ─── 배지 커스텀 ──────────────────────────────────────────── */
.bg-orange {
    background-color: #f97316 !important;
    color: #fff !important;
}

/* ─── 리스트 아이템 ────────────────────────────────────────── */
.mi-rt-area-item {
    transition: background 0.15s;
}

.mi-rt-area-item:hover {
    background: #f1f5f9 !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* ─── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 991px) {
    .mi-rt-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .mi-rt-map-wrap {
        height: 50vh;
        min-height: 350px;
    }

    .mi-rt-sidebar {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }

    .mi-rt-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .mi-rt-topbar {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .mi-rt-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .mi-rt-modal-content {
        width: 96vw;
        border-radius: 10px;
    }
}
