/* Үл хөдлөхийн үнэлгээний газрын зураг (valuation/index) */
:root {
    --val-pick: #eb6834;
    --val-surface: #ffffff;
    --val-ink: #1f2937;
    --val-muted: #6b7280;
    --val-line: #e5e7eb;
}

[data-bs-theme=dark] {
    --val-surface: #1e1e2d;
    --val-ink: #e5e7eb;
    --val-muted: #9ca3af;
    --val-line: #2b2b40;
}

.val-layout {
    display: flex;
    height: calc(100vh - 330px);
    min-height: 620px;
}

.val-map-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

#val-map, #val-cesium {
    position: absolute;
    inset: 0;
}

#val-cesium {
    display: none;
}

.val-is-3d #val-cesium {
    display: block;
}

.val-is-3d #val-map {
    visibility: hidden;
}

#val-cesium .cesium-viewer-bottom {
    font-size: 10px;
}

.val-panel {
    flex: 0 0 380px;
    border-left: 1px solid var(--val-line);
    overflow-y: auto;
    padding: 20px;
    background: var(--val-surface);
    color: var(--val-ink);
}

.val-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 10px;
}

.val-hero {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--val-ink);
}

.val-kv {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    font-size: 13px;
}

.val-kv dt {
    font-weight: 400;
    color: var(--val-muted);
}

.val-kv dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--val-ink);
}

.val-section {
    border-top: 1px dashed var(--val-line);
    margin-top: 16px;
    padding-top: 14px;
}

.val-section-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--val-ink);
}

.val-table {
    width: 100%;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.val-table th {
    color: var(--val-muted);
    font-weight: 400;
    padding: 4px 0;
    border-bottom: 1px solid var(--val-line);
}

.val-table td {
    padding: 5px 0;
    border-bottom: 1px solid var(--val-line);
}

.val-table th:not(:first-child), .val-table td:not(:first-child) {
    text-align: right;
    padding-left: 8px;
}

.val-table tr[data-comp-id] {
    cursor: pointer;
}

.val-table tr[data-comp-id]:hover td {
    background: rgba(235, 104, 52, .08);
}

.val-diff {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(107, 114, 128, .12);
    color: var(--val-ink);
}

.val-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -1px;
}

.val-legend {
    position: absolute;
    left: 12px;
    bottom: 28px;
    z-index: 5;
    background: var(--val-surface);
    color: var(--val-ink);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    font-size: 12px;
}

.val-legend-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.val-legend-items {
    display: flex;
    gap: 2px;
}

.val-legend-items span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--val-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.val-legend-items i {
    display: block;
    width: 42px;
    height: 10px;
}

.val-legend-items span:first-child i {
    border-radius: 4px 0 0 4px;
}

.val-legend-items span:last-child i {
    border-radius: 0 4px 4px 0;
}

.val-legend-note {
    margin-top: 6px;
    color: var(--val-muted);
    font-size: 11px;
}

.val-legend-note:empty {
    display: none;
}

#val-tooltip {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    display: none;
    background: var(--val-surface);
    color: var(--val-ink);
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    font-size: 12px;
    white-space: nowrap;
}

#val-tooltip b {
    font-variant-numeric: tabular-nums;
}

#val-hint {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    background: rgba(17, 24, 39, .85);
    color: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

@media (max-width: 991px) {
    .val-layout {
        flex-direction: column;
        height: auto;
    }

    .val-map-wrap {
        height: 70vh;
        flex: none;
    }

    .val-panel {
        flex: none;
        border-left: 0;
        border-top: 1px solid var(--val-line);
    }
}
