﻿.tv-root {
    padding: 8px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tv-window-body {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden !important;
}

.tv-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.tv-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 220px;
    max-width: 100%;
}

.tv-title-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.tv-chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
}

.tv-hierarchy-row {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.tv-hier-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.tv-other {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

    .tv-hierarchy-row .chip.emma-chip,
    .tv-hierarchy-row button.chip.emma-chip,
    .tv-hier-chips .chip.emma-chip,
    .tv-hier-chips button.chip.emma-chip,
    .tv-other .chip.emma-chip,
    .tv-other button.chip.emma-chip {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow: hidden;
    }

        .tv-hierarchy-row .chip.emma-chip .chip-key,
        .tv-hierarchy-row button.chip.emma-chip .chip-key {
            flex: 0 0 auto;
            white-space: nowrap;
            min-width: 0;
        }

        .tv-hierarchy-row .chip.emma-chip .chip-val,
        .tv-hierarchy-row button.chip.emma-chip .chip-val {
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .tv-hierarchy-row .chip.emma-chip.chip-nowrap,
        .tv-hierarchy-row button.chip.emma-chip.chip-nowrap {
            overflow: hidden;
        }

.tv-summary {
    padding: 8px;
    max-width: 100%;
    min-width: 0;
}

.tv-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
    max-width: 100%;
    min-width: 0;
}

.tv-card {
    border: 1px solid rgba(120,120,120,.35);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255,255,255,.04);
    box-shadow: 0 0 0 1px rgba(0,0,0,.03) inset;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.tv-card-lg {
    margin-bottom: 10px;
}

.tv-card-title {
    font-weight: 800;
    margin-bottom: 10px;
}

.tv-card-note {
    opacity: .75;
    margin-top: 8px;
    font-size: 12px;
}

.tv-hint-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
}

.tv-hint-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.tv-hint-text {
    opacity: .92;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-duty-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

    .tv-duty-row .chip.emma-chip,
    .tv-duty-row button.chip.emma-chip {
        max-width: 100%;
        min-width: 0;
    }

.tv-req-top {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
    min-width: 0;
    max-width: 100%;
}

.tv-req-count {
    font-weight: 800;
}

.tv-req-sub {
    opacity: .7;
    font-size: 12px;
}

.tv-req-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.tv-subset-line {
    margin-bottom: 6px;
    opacity: .92;
}

.tv-tabpad {
    padding: 10px;
    max-width: 100%;
    min-width: 0;
}

.tv-tabcard {
    margin-bottom: 10px;
}

.tv-tabbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.tv-tabbar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
}

.tv-tab-title {
    font-weight: 800;
}

.tv-tab-sub {
    opacity: .75;
    font-size: 12px;
}

.tv-filterline {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.tv-filtertext {
    opacity: .9;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-clear {
    margin-left: auto;
}

.tv-raw-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}
.tv-extlink {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    max-width: 100%;
}

    .tv-extlink:hover {
        text-decoration: none;
    }
