/**
 * V2 Map - 건축물정보 패널 스타일 (토지정보 패턴)
 */

/* ── 패널 바디 ── */
.building-body {
    padding: 0;
    overflow-y: auto;
}

/* ══════════════════════════════════════
   가이드 (초기 안내)
   ══════════════════════════════════════ */
.bldg-guide { padding: 20px 16px; }

.bldg-guide-hero {
    text-align: center;
    padding: 24px 0 18px;
}
.bldg-guide-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px; height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    margin-bottom: 12px;
}
.bldg-guide-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(230,81,0,0.3);
    animation: bldgPulse 2s ease-out infinite;
}
@keyframes bldgPulse {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}
.bldg-guide-hero-title {
    font-size: 15px; font-weight: 700; color: #333;
    margin-bottom: 4px;
}
.bldg-guide-hero-sub {
    font-size: 12px; color: #888;
}

.bldg-guide-section {
    margin-top: 16px;
}
.bldg-guide-section-title {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 700; color: #555;
    margin-bottom: 8px;
}

/* 카드 */
.bldg-guide-cards {
    display: flex; flex-direction: column; gap: 6px;
}
.bldg-guide-card {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}
.bldg-guide-card strong {
    display: block; font-size: 12px; color: #333;
}
.bldg-guide-card span {
    display: block; font-size: 10px; color: #999;
}

/* 태그 */
.bldg-guide-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
}
.bldg-guide-tag {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 12px;
    background: #f5f5f5; color: #666;
}
.bldg-guide-tag.tag-addr   { background: #e3f2fd; color: #1565C0; }
.bldg-guide-tag.tag-spec   { background: #fff3e0; color: #E65100; }
.bldg-guide-tag.tag-area   { background: #e8f5e9; color: #2E7D32; }
.bldg-guide-tag.tag-ratio  { background: #fce4ec; color: #C62828; }
.bldg-guide-tag.tag-date   { background: #f3e5f5; color: #7B1FA2; }
.bldg-guide-tag.tag-road   { background: #e0f2f1; color: #00695C; }

/* 안내 노트 */
.bldg-guide-notes {
    display: flex; flex-direction: column; gap: 6px;
}
.bldg-guide-note {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 11px; color: #666; line-height: 1.5;
}
.bldg-guide-note strong { color: #E65100; }

/* 하단 출처 */
.bldg-guide-footer, .bldg-footer {
    display: flex; align-items: center; gap: 5px;
    padding: 10px 0; margin-top: 14px;
    border-top: 1px solid #f0f0f0;
    font-size: 10px; color: #bbb;
}

/* ══════════════════════════════════════
   로딩
   ══════════════════════════════════════ */
.bldg-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; padding: 60px 0;
    color: #999; font-size: 12px;
}
.bldg-loading-spinner {
    width: 24px; height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #E65100;
    border-radius: 50%;
    animation: bldgSpin 0.7s linear infinite;
}
@keyframes bldgSpin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   결과: 주소 블록
   ══════════════════════════════════════ */
.bldg-addr-block {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fff8f0, #ffffff);
}
.bldg-addr-main {
    font-size: 14px; font-weight: 700; color: #333;
    line-height: 1.5;
}
.bldg-addr-name {
    font-size: 13px; font-weight: 600; color: #E65100;
    margin-top: 3px;
}
.bldg-addr-sub {
    font-size: 11px; color: #888; margin-top: 1px;
}
.bldg-addr-eng {
    font-size: 10px; color: #aaa; margin-top: 2px;
}

/* ══════════════════════════════════════
   결과: 섹션 + 테이블
   ══════════════════════════════════════ */
.bldg-section {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
}
.bldg-section:last-child { border-bottom: none; }

.bldg-section-title {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 700; color: #444;
    margin-bottom: 8px;
}

.bldg-table {
    width: 100%;
    border-collapse: collapse;
}
.bldg-td-label {
    width: 100px;
    font-size: 11px; color: #999; font-weight: 500;
    padding: 5px 0;
    vertical-align: top;
}
.bldg-td-value {
    font-size: 12px; color: #333;
    padding: 5px 0;
}
.bldg-td-value strong { color: #E65100; }
.bldg-td-accent { color: #1565C0; }

.bldg-table tr + tr .bldg-td-label,
.bldg-table tr + tr .bldg-td-value {
    border-top: 1px solid #f5f5f5;
}

.bldg-mgt-sn {
    font-family: 'Consolas', 'D2Coding', monospace;
    font-size: 10px; color: #666;
    background: #f5f5f5;
    padding: 1px 4px; border-radius: 3px;
    word-break: break-all;
}

/* ── 용적률/건폐율 바 ── */
.bldg-ratio-bar-wrap {
    display: flex; flex-direction: column; gap: 8px;
}
.bldg-ratio-item {
    display: flex; align-items: center; gap: 8px;
}
.bldg-ratio-label {
    width: 50px; font-size: 11px; font-weight: 600; color: #666;
    flex-shrink: 0;
}
.bldg-ratio-bar {
    flex: 1; height: 8px;
    background: #f0f0f0; border-radius: 4px;
    overflow: hidden;
}
.bldg-ratio-fill {
    height: 100%; border-radius: 4px;
    transition: width 0.5s ease;
}
.bldg-ratio-vl { background: linear-gradient(90deg, #2E7D32, #66BB6A); }
.bldg-ratio-bc { background: linear-gradient(90deg, #E65100, #FF9800); }
.bldg-ratio-val {
    width: 55px; text-align: right;
    font-size: 12px; font-weight: 700; color: #333;
    flex-shrink: 0;
}

/* ── 안내 배너 ── */
.bldg-notice {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 14px; margin: 12px 16px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    font-size: 11px; color: #795548; line-height: 1.5;
}
.bldg-notice strong { color: #E65100; }

/* ══════════════════════════════════════
   우측 툴바 버튼
   ══════════════════════════════════════ */
.v2-toolbar-building { background: none; box-shadow: none; overflow: visible; align-items: flex-end; }
.v2-toolbar-building .v2-toolbar-btn { box-shadow: 0 2px 8px rgba(0,0,0,0.25); min-width: 80px; justify-content: center; }
.v2-toolbar-building .v2-toolbar-label { font-size: 10px; }

/* ══════════════════════════════════════
   탭 바
   ══════════════════════════════════════ */
.bldg-tab-bar {
    display: flex;
    gap: 0;
    padding: 0 8px;
    background: #fafafa;
    border-bottom: 2px solid #f0f0f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.bldg-tab-bar::-webkit-scrollbar { display: none; }

.bldg-tab {
    display: flex; align-items: center; gap: 3px;
    padding: 8px 8px 7px;
    font-size: 11px; font-weight: 600;
    color: #999;
    background: none; border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    margin-bottom: -2px;
}
.bldg-tab svg { opacity: 0.5; transition: opacity 0.2s; }
.bldg-tab:hover { color: #666; }
.bldg-tab:hover svg { opacity: 0.7; }
.bldg-tab.active {
    color: #E65100;
    border-bottom-color: #E65100;
}
.bldg-tab.active svg { opacity: 1; stroke: #E65100; }

/* 탭 콘텐츠 */
.bldg-tab-content {
    min-height: 200px;
}

/* ══════════════════════════════════════
   푸터
   ══════════════════════════════════════ */
.bldg-footer {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 10px; color: #bbb;
}

/* ══════════════════════════════════════
   건축대장 연계 배지
   ══════════════════════════════════════ */
.bldg-ledger-ok {
    display: inline-block;
    font-size: 10px; font-weight: 600;
    padding: 2px 8px; margin-top: 6px;
    border-radius: 10px;
    background: #e8f5e9; color: #2E7D32;
}
.bldg-ledger-na {
    display: inline-block;
    font-size: 10px; font-weight: 600;
    padding: 2px 8px; margin-top: 6px;
    border-radius: 10px;
    background: #fff3e0; color: #E65100;
}

/* ══════════════════════════════════════
   동 헤더 / 구분선
   ══════════════════════════════════════ */
.bldg-dong-header {
    font-size: 12px; font-weight: 700; color: #333;
    padding: 8px 0 4px;
    display: flex; align-items: center; gap: 6px;
}
.bldg-dong-cnt {
    font-size: 10px; font-weight: 500; color: #999;
}
.bldg-divider {
    height: 1px; background: #eee; margin: 8px 0;
}

/* ══════════════════════════════════════
   층별정보 (리스트)
   ══════════════════════════════════════ */
.bldg-floor-list {
    display: flex; flex-direction: column; gap: 2px;
    margin-bottom: 8px;
}
.bldg-floor-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    background: #fafafa;
    border-radius: 6px;
    border-left: 3px solid #E65100;
    transition: background 0.15s;
}
.bldg-floor-row:hover { background: #fff3e0; }
.bldg-floor-row.underground {
    border-left-color: #78909C;
    background: #f5f5f5;
}
.bldg-floor-row.underground:hover { background: #eceff1; }
.bldg-floor-no {
    min-width: 48px;
    font-size: 11px; font-weight: 700; color: #333;
    flex-shrink: 0;
}
.bldg-floor-info {
    flex: 1;
    display: flex; align-items: center; gap: 6px;
    min-width: 0;
}
.bldg-floor-purps {
    font-size: 11px; color: #555;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bldg-floor-area {
    font-size: 10px; font-weight: 600; color: #1565C0;
    white-space: nowrap; flex-shrink: 0;
}
.bldg-floor-struct {
    font-size: 10px; color: #aaa;
    white-space: nowrap; flex-shrink: 0;
}

/* ══════════════════════════════════════
   세대 칩 그리드
   ══════════════════════════════════════ */
.bldg-unit-grid {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 8px;
}
.bldg-unit-chip {
    font-size: 10px; font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    background: #f5f5f5; color: #555;
    border: 1px solid #eee;
    transition: background 0.15s;
}
.bldg-unit-chip:hover { background: #fff3e0; border-color: #ffcc80; }
.bldg-unit-more {
    font-size: 10px; color: #999;
    padding: 3px 8px;
}

/* ══════════════════════════════════════
   가격 통계 요약
   ══════════════════════════════════════ */
.bldg-price-summary {
    display: flex; gap: 8px;
    margin-bottom: 12px;
}
.bldg-price-stat {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}
.bldg-price-stat.bldg-price-avg {
    background: #fff3e0;
    border-color: #ffcc80;
}
.bldg-price-label {
    font-size: 10px; color: #999; margin-bottom: 3px;
}
.bldg-price-val {
    font-size: 12px; font-weight: 700; color: #333;
}
.bldg-price-avg .bldg-price-val { color: #E65100; }

/* ══════════════════════════════════════
   컴팩트 테이블 (세대/가격/부속지번)
   ══════════════════════════════════════ */
.bldg-table-compact {
    font-size: 11px;
}
.bldg-table-compact td {
    padding: 4px 4px;
    border-bottom: 1px solid #f5f5f5;
}
.bldg-table-head td {
    font-size: 10px; font-weight: 700; color: #999;
    background: #fafafa;
    padding: 5px 4px;
    border-bottom: 1px solid #eee;
}
.bldg-td-price {
    font-weight: 700; color: #E65100;
    text-align: right; white-space: nowrap;
}
.bldg-more-note {
    font-size: 10px; color: #bbb;
    text-align: center;
    padding: 8px 0;
}

/* ══════════════════════════════════════
   부가정보 배지
   ══════════════════════════════════════ */
.bldg-badge-repr {
    display: inline-block;
    font-size: 9px; font-weight: 600;
    padding: 1px 5px;
    border-radius: 6px;
    background: #e3f2fd; color: #1565C0;
    margin-left: 4px;
}

/* ══════════════════════════════════════
   빈 상태
   ══════════════════════════════════════ */
.bldg-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; padding: 50px 20px;
    text-align: center;
    font-size: 12px; color: #999;
}

/* ── 패널 스크롤바 ── */
.building-body::-webkit-scrollbar { width: 3px; }
.building-body::-webkit-scrollbar-track { background: transparent; }
.building-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.building-body:hover::-webkit-scrollbar-thumb { background: #bbb; }
