/**
 * RTS Programación – Estilos CSS (Responsive y Táctil)
 * Conforme a directrices de guia_ia.md
 */

.rts-prog-wrapper {
    max-width: 860px;
    margin: 0 auto 2.5rem;
    font-family: inherit;
    box-sizing: border-box;
}

.rts-prog-wrapper * {
    box-sizing: border-box;
}

/* ── TABS NAVEGACIÓN ── */
.rts-prog-tabs-container {
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
}

.rts-prog-tabs-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.rts-prog-tabs-scroll::-webkit-scrollbar {
    height: 4px;
}
.rts-prog-tabs-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.rts-prog-tab-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease-in-out;
    min-height: 42px; /* Touch target móvil */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rts-prog-tab-btn:hover:not(.is-disabled):not(.is-active) {
    background: #e2e8f0;
    color: #0f172a;
}

.rts-prog-tab-btn.is-active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.rts-prog-tab-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f8fafc;
}

/* ── CONTENIDO DE PANES ── */
.rts-prog-panes {
    position: relative;
}

.rts-prog-pane {
    display: none;
    animation: rtsProgFadeIn 0.22s ease-in-out;
}

.rts-prog-pane.is-active {
    display: block;
}

@keyframes rtsProgFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── TABLA DE PROGRAMACIÓN ── */
.rts-prog-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.rts-prog-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.rts-prog-table tbody tr:last-child {
    border-bottom: none;
}

.rts-prog-table tbody tr:hover {
    background-color: #f8fafc;
}

.rts-prog-cell-time {
    width: 90px;
    min-width: 75px;
    padding: 0.75rem 1rem;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0284c7;
    white-space: nowrap;
    vertical-align: middle;
}

.rts-prog-cell-name {
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    color: #1e293b;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ── MODO DÍA ÚNICO ── */
.rts-prog-modo-dia .rts-prog-dia-titulo {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0284c7;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

/* ── MENSAJE VACÍO ── */
.rts-prog-empty {
    text-align: center;
    color: #64748b;
    padding: 2.5rem 1rem;
    font-style: italic;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

/* ── RESPONSIVE MOBILE (@media) ── */
@media (max-width: 600px) {
    .rts-prog-tab-btn {
        font-size: 0.78rem;
        padding: 0.45rem 0.85rem;
        border-radius: 6px;
    }

    .rts-prog-cell-time {
        width: 65px;
        min-width: 60px;
        padding: 0.6rem 0.65rem;
        font-size: 0.85rem;
    }

    .rts-prog-cell-name {
        padding: 0.6rem 0.65rem;
        font-size: 0.85rem;
    }
}
