/* === Programs Filter Bar === */
.programs-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.programs-filter-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.programs-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.programs-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.programs-count {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 32px;
}

/* === Table === */
.programs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.programs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* === Header === */
.programs-table thead th {
    font-family: 'Nunito', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: color 0.2s;
}

.programs-table thead th:hover {
    color: var(--primary);
}

.programs-table thead th.sort-active {
    color: var(--primary);
}

.sort-indicator {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.2s;
}

.sort-active .sort-indicator {
    opacity: 1;
}

.sort-asc .sort-indicator {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid var(--primary);
}

.sort-desc .sort-indicator {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--primary);
}

/* === Rows === */
.programs-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.programs-table tbody tr:hover {
    background: rgba(143, 166, 138, 0.06);
}

.programs-table tbody tr[hidden] {
    display: none;
}

.programs-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    color: var(--text);
}

/* === Title Column === */
.programs-col-title a {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.programs-col-title a:hover {
    color: var(--secondary-dk);
    text-decoration: underline;
}

/* === Type Badge === */
.program-type-badge {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.program-type-badge--skit {
    background: rgba(181, 100, 106, 0.12);
    color: var(--primary);
}

.program-type-badge--play {
    background: rgba(168, 144, 128, 0.15);
    color: var(--accent);
}

/* === Tags === */
.programs-col-theme,
.programs-col-season {
    white-space: normal;
}

.program-tag {
    display: inline-block;
    background: #f7f5f2;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e8e4df;
    font-size: 0.75rem;
    color: #3b3b3b;
    margin: 1px 2px;
    white-space: nowrap;
}

/* === Numeric Columns === */
.programs-col-duration,
.programs-col-actors {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.85rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    .programs-filters {
        flex-wrap: wrap;
    }

    .programs-table thead {
        display: none;
    }

    .programs-table,
    .programs-table tbody,
    .programs-table tr,
    .programs-table td {
        display: block;
    }

    .programs-table tbody tr {
        padding: 16px 0;
        border-bottom: 1px solid var(--border);
    }

    .programs-table tbody td {
        padding: 3px 0;
        border: none;
    }

    .programs-col-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .programs-col-duration::before {
        content: 'Duration: ';
        font-weight: 600;
        color: var(--text);
    }

    .programs-col-actors::before {
        content: 'Actors: ';
        font-weight: 600;
        color: var(--text);
    }

    .programs-col-duration:empty::before,
    .programs-col-actors:empty::before {
        content: none;
    }
}
