/**
 * Íslenskir þættir page styles
 * Template: template-islenskir-thaettir.php
 *
 * Brand colours:
 *   Orange  #f1633b   (primary CTA)
 *   Teal    #62b0ba   (primary accent)
 *   Dark    #383d40   (text)
 */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.it-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    font-family: 'Open Sans', Arial, sans-serif;
    color: #383d40;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.it-header {
    margin-bottom: 12px;
}
.it-header__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #383d40;
}
.it-header__sub {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* ── Legend ──────────────────────────────────────────────────────────────── */
.it-legend {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.it-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.it-badge--live     { background: #e8f5e9; color: #2e7d32; }
.it-badge--upcoming { background: #fff3e0; color: #e65100; }
.it-badge--recent   { background: #e3f2fd; color: #1565c0; }
.it-badge--ended    { background: #f5f5f5; color: #9e9e9e; }

/* ── Show list ───────────────────────────────────────────────────────────── */
.it-show-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Single show row ─────────────────────────────────────────────────────── */
.it-show {
    border-bottom: 1px solid #e0e0e0;
}
.it-show:first-child {
    border-top: 1px solid #e0e0e0;
}

/* Show header row — the clickable "single line" */
.it-show__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    text-decoration: none;
    color: #383d40;
    transition: background 0.15s;
}
.it-show__header:hover {
    background: #f9f9f9;
    text-decoration: none;
}

/* Poster thumbnail */
.it-show__poster {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #e0e0e0;
}

/* Title + year */
.it-show__meta {
    flex: 1;
    min-width: 0;
}
.it-show__title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.it-show__year {
    display: block;
    font-size: 0.78rem;
    color: #888;
}

/* Right side: badge + provider logos */
.it-show__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.it-show__providers {
    display: flex;
    align-items: center;
    gap: 4px;
}
.it-provider-logo {
    height: 18px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    border-radius: 3px;
}

/* ── Episodes section ─────────────────────────────────────────────────────── */
.it-show__episodes {
    padding: 0 8px 12px 56px;  /* aligns with title text */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Group header */
.it-ep-group__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #62b0ba;
    margin: 0 0 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Single episode row */
.it-ep {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    padding: 4px 0;
    border-bottom: 1px dashed #ebebeb;
}
.it-ep:last-child { border-bottom: none; }

.it-ep__num {
    font-weight: 700;
    color: #383d40;
    white-space: nowrap;
    min-width: 52px;
}
.it-ep__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #383d40;
}
.it-ep__date {
    white-space: nowrap;
    color: #888;
    font-size: 0.78rem;
}
.it-ep--upcoming .it-ep__date { color: #e65100; }

.it-ep__countdown {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f1633b;
    white-space: nowrap;
}

.it-ep__link {
    font-size: 0.75rem;
    color: #62b0ba;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
}
.it-ep__link:hover { color: #f1633b; }

/* Empty state */
.it-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .it-show__episodes { padding-left: 16px; }
    .it-ep__link { display: none; }
    .it-ep__countdown { display: none; }
    .it-ep__name { font-size: 0.78rem; }
}
