/*
 * The chat strip in the masthead.
 *
 * Only drawn when the panel switches it on (Vzhled -> Chat v hlavičce),
 * so every rule here is scoped to the strip and the panel it opens.
 * Colours come from the theme's own variables, so the strip follows
 * whichever theme the site runs.
 */

/* The strip is a band of its own, right under the fixed bar; the page
   starts lower while it is on (see body.has-rs-strip below). */
body.has-rs-strip {
    padding-top: calc(var(--bar, 30px) + 38px);
}

.rs-strip {
    position: fixed;
    top: var(--bar, 30px);
    left: 0;
    right: 0;
    z-index: 1099;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.1));
    background: var(--surface, #0a1210);
    background: color-mix(in srgb, var(--surface, #0a1210) 92%, #000);
    overflow: hidden;
}

/* Only the rooms scroll; the label and the way into the panel stay put. */
.rs-scroll {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.rs-scroll::-webkit-scrollbar {
    display: none;
}

.rs-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary, #c8102e);
    white-space: nowrap;
}

.rs-label i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary, #c8102e);
    box-shadow: 0 0 0 3px var(--primary-dim, rgba(200, 16, 46, 0.14));
}

.rs-sep {
    width: 1px;
    height: 16px;
    margin: 0 3px;
    background: var(--line, rgba(255, 255, 255, 0.1));
}

.rs-chips {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.rs-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    padding: 0 8px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    letter-spacing: 0.04em;
    color: var(--ink-dim, rgba(234, 246, 241, 0.64));
    text-decoration: none;
    white-space: nowrap;
}

.rs-chip b {
    color: var(--ink-faint, rgba(234, 246, 241, 0.38));
    font-weight: 400;
}

.rs-chip:hover {
    border-color: var(--line-strong, rgba(255, 255, 255, 0.2));
    color: var(--ink, #eaf6f1);
}

.rs-chip.is-active {
    background: var(--primary-dim, rgba(200, 16, 46, 0.14));
    border-color: var(--primary-line, rgba(208, 26, 51, 0.4));
    color: var(--ink, #eaf6f1);
}

.rs-chip.is-add {
    border-style: dashed;
    color: var(--color-cyan, #36d8c4);
}

.rs-more {
    flex: none;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.2));
    background: transparent;
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--ink-dim, rgba(234, 246, 241, 0.64));
    cursor: pointer;
}

.rs-more:hover,
.rs-more[aria-expanded="true"] {
    border-color: var(--primary-line, rgba(208, 26, 51, 0.4));
    color: var(--ink, #eaf6f1);
}

.rs-more b {
    color: var(--primary, #c8102e);
    font-weight: 400;
}

.rs-more svg {
    width: 12px;
    height: 12px;
}

/* ── the panel under the strip ─────────────────────────────────────── */

.rs-mega {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--bar, 30px) + 38px);
    z-index: 1098;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line, rgba(255, 255, 255, 0.1));
    border-bottom: 1px solid var(--line-strong, rgba(255, 255, 255, 0.2));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.rs-mega[hidden] {
    display: none;
}

.rs-col {
    background: var(--surface, #0a1210);
    padding: 14px 16px 16px;
    min-width: 0;
}

.rs-col h3 {
    margin: 0 0 8px;
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint, rgba(234, 246, 241, 0.38));
    font-weight: 400;
}

.rs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.1));
    font-size: 12px;
    color: var(--ink, #eaf6f1);
    text-decoration: none;
}

.rs-row span {
    color: var(--ink-faint, rgba(234, 246, 241, 0.38));
    font-family: var(--font-mono, monospace);
    font-size: 9px;
}

.rs-row b {
    margin-left: auto;
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    font-weight: 400;
    color: var(--ink-dim, rgba(234, 246, 241, 0.64));
}

.rs-row:hover {
    color: var(--primary, #c8102e);
}

.rs-people {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 5px;
}

.rs-person {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
    overflow: hidden;
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    color: var(--ink, #eaf6f1);
    text-decoration: none;
}

.rs-person img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rs-person:hover {
    border-color: var(--primary, #c8102e);
}

.rs-more-link {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--color-cyan, #36d8c4);
    text-decoration: none;
}

.rs-empty {
    margin: 0;
    font-size: 11px;
    color: var(--ink-faint, rgba(234, 246, 241, 0.38));
}

@media (max-width: 760px) {
    .rs-strip {
        padding: 0 9px;
    }

    .rs-label,
    .rs-sep {
        display: none;
    }

    .rs-mega {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }
}
