/* 2026-10-19 (GitHub #104): the overview - the approved prototype "Apžvalga". The tokens are the shell's (shell.css); the rows, tags and
   panels reuse the camera / section page's classes (workbench.css). */

.ov {
    display: flex;
    height: calc(100vh - 61px);
    min-height: 520px;
}

.ov-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px 0;
    min-height: 0;
}

.ov-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

/* 2026-11-02 (GitHub #229): six tiles - two rows of three where one row of six would squeeze the labels. */
@media (max-width: 1700px) {
    .ov-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 2026-11-02 (#229): the tile's 30-day line. */
.ov-kpi .sz-spark {
    display: block;
    color: var(--sz-acc);
}

/* 2026-11-02 (GitHub #230): the selected object's own map in the overview's detail panel. */
.ov-minimap {
    position: relative;
    margin: 0 0 12px;
    border: 1px solid var(--sz-line);
    border-radius: 12px;
    overflow: hidden;
}

.ov-minimap .sz-map {
    border-radius: 0;
}

/* Top left: the map's own zoom buttons are top right. */
.ov-minimap-open {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

/* 2026-10-27 (#178): the AI results' tile stands out (the mock-up's blue frame). */
.ov-kpi.ai {
    border: 2px solid #1f7fae;
}

.ov-kpi {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--sz-line);
    background: var(--sz-surf);
    color: var(--sz-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}

.ov-kpi > * {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
}

.ov-kpi:hover {
    border-color: var(--sz-acc);
}

.ov-kpi:focus-visible {
    outline: 2px solid var(--sz-sky);
    outline-offset: 1px;
}

.ov-kpi-value {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.ov-kpi-value b {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

.ov-kpi-value .wb-dim {
    padding-bottom: 3px;
}

.ov-sub {
    font-size: 11px;
    font-weight: 700;
    color: var(--sz-faint);
}

.ov-sub.ok {
    color: var(--sz-okfg);
}

.ov-sub.warn {
    color: var(--sz-warnfg);
}

.ov-sub.bad {
    color: var(--sz-badfg);
}

.ov-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ov-head h2 {
    margin: 0 8px 0 0;
    font-size: 16px;
    font-weight: 800;
}

.ov-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-bottom: 16px;
}

.ov-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 60px 20px;
    text-align: center;
    color: var(--sz-mut);
}

.ov-empty b {
    color: var(--sz-text);
    font-size: 16px;
}

.ov-empty-mark {
    font-size: 34px;
    color: var(--sz-okfg);
}

.ov-group {
    margin-bottom: 14px;
}

.ov-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 8px;
}

.ov-group-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sz-soft);
}

.ov-group-note {
    margin-left: 6px;
    font-weight: 500;
}

.ov-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    background: var(--sz-mut);
}

.ov-dot.ok {
    background: #4cd964;
}

.ov-dot.warn {
    background: #f5a623;
}

.ov-dot.bad {
    background: #ff6b5e;
}

.ov-rows {
    border: 1px solid var(--sz-line);
    border-radius: 18px;
    background: var(--sz-surf);
    overflow: hidden;
}

.ov-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px 0 10px;
    border-top: 1px solid var(--sz-hair);
    transition: background .12s;
}

.ov-row:first-child {
    border-top: 0;
}

.ov-row:hover {
    background: var(--sz-raised);
}

.ov-row.sel {
    background: var(--sz-accbg);
    box-shadow: inset 0 0 0 1px rgba(46, 156, 202, .4);
}

.ov-bar {
    width: 4px;
    align-self: stretch;
    margin: 8px 0;
    border-radius: 4px;
    flex: none;
}

.ov-pick {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--sz-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ov-pick:focus-visible {
    outline: 2px solid var(--sz-sky);
    outline-offset: 2px;
    border-radius: 8px;
}

.ov-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--sz-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 14px;
}

.ov-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ov-text > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ov-text b {
    font-size: 14px;
    font-weight: 800;
}

.ov-text .wb-dim {
    font-weight: 500;
    font-size: 12px;
}

.ov-age {
    width: 82px;
    text-align: right;
    flex: none;
}

.ov-quick {
    opacity: 0;
    transition: opacity .12s;
    flex: none;
}

.ov-row:hover .ov-quick, .ov-row.sel .ov-quick, .ov-quick:focus-visible {
    opacity: 1;
}

.ov-side {
    width: 370px;
    flex: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--sz-hair);
    background: var(--sz-side);
}

.ov-detail-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--sz-soft);
}

.ov-cards {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ov-card {
    padding: 14px;
    border-radius: 18px;
    background: var(--sz-surf);
    border: 1px solid var(--sz-line);
}

.ov-card .wb-lbl {
    margin: 0 0 8px;
}

.ov-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ov-card-head .wb-lbl {
    margin: 0;
}

.ov-card-head + * {
    margin-top: 10px;
}

.ov-card a.wb-dim {
    text-decoration: none;
}

.ov-health {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
}

.ov-health-label {
    flex: 1;
}

.ov-pack {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    border-top: 1px solid var(--sz-hair);
}

.ov-pack .ov-text > * {
    white-space: normal;
}

.ov-pack-cc {
    width: 26px;
    flex: none;
}

.ov-big {
    font-size: 22px;
    font-weight: 800;
}

.ov-meter {
    height: 8px;
    border-radius: 99px;
    background: var(--sz-raised);
    overflow: hidden;
}

.ov-meter > div {
    height: 100%;
    background: linear-gradient(90deg, #2e9cca, #7fd0f2);
}

@media (max-width: 1100px) {
    .ov-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ov {
        flex-direction: column;
        height: auto;
    }

    .ov-main {
        padding: 12px 12px 0;
    }

    .ov-list {
        overflow: visible;
    }

    .ov-side {
        width: auto;
        border-left: 0;
        border-top: 1px solid var(--sz-hair);
    }

    .ov-age, .ov-row .wb-tag {
        display: none;
    }

    .ov-quick {
        opacity: 1;
    }

    /* 2026-11-02 (UI/UX check, #230): the selected item's panel covers the screen; its ✕ closes it. */
    .ov-side.has-sel {
        position: fixed;
        inset: 0;
        z-index: 1300;
        overflow-y: auto;
        border-top: 0;
        background: var(--sz-bg);
    }
}
