﻿/* ── Twitch carousel ─────────────────────────────────────────────────────────
   Matches the Curia Astralis palette:
   - teal text: rgba(116, 218, 232, 0.85)
   - panel bg:  radial-gradient purple → dark charcoal
   - fonts:     Inconsolata (labels), Quattrocento Sans (body)
   ─────────────────────────────────────────────────────────────────────────── */

.tc-section {
    margin: 2em 0;
}

/* Outer panel — matches .page aesthetic */
.tc-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(30, 15, 40, 0.7);
    border: 1px solid rgba(116, 218, 232, 0.1);
}

/* ── Featured embed ──────────────────────────────────────────────────────── */

.tc-featured-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(20, 10, 30, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-featured-embed > div,
.tc-featured-embed iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

.tc-select-prompt {
    color: rgba(116, 218, 232, 0.4);
    font-family: 'Inconsolata', monospace;
    font-size: 0.9em;
    text-align: center;
    margin: 0;
    pointer-events: none;
}

/* ── Info bar ─────────────────────────────────────────────────────────────── */

.tc-info {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex-wrap: wrap;
    padding: 0.6em 1em;
    border-top: 1px solid rgba(116, 218, 232, 0.08);
    border-bottom: 1px solid rgba(116, 218, 232, 0.08);
}

.tc-info-name {
    flex: 1 1 auto;
    font-family: 'Inconsolata', monospace;
    font-size: 0.95em;
    color: rgba(116, 218, 232, 0.85);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-info-status {
    font-family: 'Inconsolata', monospace;
    font-size: 0.8em;
    white-space: nowrap;
}

.tc-info-status--live    { color: #ff4444; }
.tc-info-status--offline { color: rgba(116, 218, 232, 0.35); }

.tc-twitch-link {
    flex-shrink: 0;
    font-size: 0.75em;
    padding: 0.35em 0.9em;
}

/* ── Thumbnail strip ──────────────────────────────────────────────────────── */

.tc-strip {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(116, 218, 232, 0.15) transparent;
}

.tc-strip::-webkit-scrollbar        { height: 3px; }
.tc-strip::-webkit-scrollbar-track  { background: transparent; }
.tc-strip::-webkit-scrollbar-thumb  { background: rgba(116, 218, 232, 0.15); border-radius: 2px; }

/* ── Individual thumbnails ────────────────────────────────────────────────── */

.tc-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 160px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    border-right: 1px solid rgba(116, 218, 232, 0.06);
    transition: background 0.2s ease;
}

.tc-thumb:last-child { border-right: none; }

.tc-thumb:hover { background: rgba(116, 218, 232, 0.05); }

/* Image wrapper — holds the outline ring */
.tc-thumb-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.tc-thumb-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0;
    pointer-events: none;
    transition: box-shadow 0.3s ease;
}

.tc-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

/* Unknown — waiting for probe result */
.tc-thumb--unknown img {
    filter: grayscale(0.5) brightness(0.6);
    opacity: 0.7;
}

/* Offline — muted, greyscale */
.tc-thumb--offline img {
    filter: grayscale(1) brightness(0.5);
    opacity: 0.6;
}

/* Live — full colour, red outline ring */
.tc-thumb--live img {
    filter: brightness(0.85);
    opacity: 1;
}

.tc-thumb--live .tc-thumb-img-wrap::after {
    box-shadow: inset 0 0 0 3px #e91916;
}

.tc-thumb--live:hover img,
.tc-thumb--active img {
    filter: brightness(1);
    opacity: 1;
}

/* Active (selected) — teal underline */
.tc-thumb--active {
    background: rgba(116, 218, 232, 0.07);
    box-shadow: inset 0 -2px 0 rgba(116, 218, 232, 0.6);
}

/* Streamer name */
.tc-thumb-name {
    display: block;
    padding: 0.35em 0.5em 0.4em;
    font-family: 'Inconsolata', monospace;
    font-size: 0.75em;
    color: rgba(116, 218, 232, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    transition: color 0.2s ease;
}

.tc-thumb--live    .tc-thumb-name { color: rgba(116, 218, 232, 0.85); }
.tc-thumb--active  .tc-thumb-name { color: rgba(116, 218, 232, 1); }

/* LIVE badge — only visible when live */
.tc-live-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #e91916;
    color: #fff;
    font-family: 'Inconsolata', monospace;
    font-size: 0.6em;
    font-weight: bold;
    letter-spacing: 0.08em;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tc-thumb--live .tc-live-badge { opacity: 1; }

/* Error state */
.tc-error {
    padding: 2em;
    text-align: center;
    color: rgba(116, 218, 232, 0.35);
    font-family: 'Inconsolata', monospace;
    font-size: 0.9em;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .tc-thumb { width: 120px; }

    .tc-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4em;
    }
}