/* OBS-виджет (общие стили для превью и overlay.html) */

.hgw {
    --hgw-num: 16px;
    --hgw-label: 9px;
    --hgw-label-color: #8c7662;
    --hgw-accent: #d1b894;
    --hgw-line: rgba(255, 255, 255, 0.08);
    width: 320px;
    padding: 16px 18px;
    color: #f5f5f5;
    transform-origin: top left;
}

/* Тень у текста — чтобы цифры читались без фона */
.hgw--shadow {
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.7);
}

.hgw__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hgw-line);
}

.hgw__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #f5f5f5;
    font-size: 9px;
    font-weight: 700;
}

.hgw__nick {
    color: var(--hgw-accent);
    font-size: 14px;
    font-weight: 700;
}

.hgw__rank {
    margin-left: auto;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid;
}

.hgw__grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hgw__row {
    display: grid;
    gap: 8px;
    text-align: center;
}

.hgw__grid--session {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--hgw-line);
}

.hgw__cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hgw__label {
    color: var(--hgw-label-color);
    font-size: var(--hgw-label);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hgw__value {
    font-size: var(--hgw-num);
    font-weight: 700;
    line-height: 1.1;
}

.hgw__foot {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 8px;
    color: var(--hgw-label-color);
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-top: 1px solid var(--hgw-line);
    opacity: 0.8;
}

.hgw__foot b {
    color: var(--hgw-accent);
    font-size: 9px;
}

/* Горизонтальная полоса внизу экрана */
.hgw--bar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 18px;
    width: auto;
    padding: 8px 16px;
}

.hgw--bar .hgw__head {
    margin: 0;
    padding: 0 16px 0 0;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hgw--bar .hgw__grid {
    flex-direction: row;
    gap: 16px;
}

.hgw--bar .hgw__row {
    display: flex;
    gap: 16px;
}

.hgw--bar .hgw__grid--session {
    margin: 0;
    padding: 0 0 0 16px;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.hgw--bar .hgw__foot {
    flex-direction: column;
    margin: 0;
    padding: 0 0 0 16px;
    border-top: none;
}

/* Компактная плашка */
.hgw--mini {
    width: 220px;
    padding: 10px 12px;
}

.hgw--mini .hgw__head {
    margin-bottom: 8px;
    padding-bottom: 6px;
}

.hgw--mini .hgw__grid {
    gap: 6px 4px;
}

.hgw--mini .hgw__label {
    font-size: calc(var(--hgw-label) - 1px);
}

.hgw--mini .hgw__value {
    font-size: calc(var(--hgw-num) - 3px);
}

/* Колонка сбоку экрана */
.hgw--column {
    width: 150px;
}

.hgw--column .hgw__row {
    grid-template-columns: 1fr !important;
    text-align: left;
}

.hgw--column .hgw__cell {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
}
