/* =============================================================================
   AOS Program — Frontend CSS
   ============================================================================= */

:root {
    --aospf-primary: #2271b1;
    --aospf-bg: #f8f9fa;
    --aospf-card: #ffffff;
    --aospf-border: #dee2e6;
    --aospf-text: #212529;
    --aospf-muted: #6c757d;
    --aospf-radius: 6px;
}

/* ── Contenedor Principal ───────────────────────────────────────────────────── */
.aos-program-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--aospf-text);
}

/* ── Cabecera del Programa ──────────────────────────────────────────────────── */
.aos-program-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.aos-program-title {
    font-size: 1.6em;
    font-weight: 700;
    margin: 0;
}

.aos-program-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aos-program-status-badge.draft {
    background: #fff3cd;
    color: #664d03;
}

.aos-program-status-badge.final {
    background: #d1e7dd;
    color: #0a3622;
}

/* ── Filtros AJAX ───────────────────────────────────────────────────────────── */
.aos-program-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.aos-program-filters input,
.aos-program-filters select {
    border: 1px solid var(--aospf-border);
    border-radius: var(--aospf-radius);
    padding: 8px 12px;
    font-size: 0.9em;
    outline: none;
    transition: border-color .15s;
}

.aos-program-filters input:focus,
.aos-program-filters select:focus {
    border-color: var(--aospf-primary);
}

/* Selector de Día */
.aos-day-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--aospf-border);
    padding-bottom: 0;
}

.aos-day-tab {
    padding: 8px 18px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--aospf-muted);
    background: transparent;
    transition: all .15s;
    position: relative;
    bottom: -2px;
}

.aos-day-tab:hover,
.aos-day-tab.active {
    background: var(--aospf-card);
    border-color: var(--aospf-border);
    border-bottom-color: var(--aospf-card);
    color: var(--aospf-primary);
}

/* ── Grid del Programa ──────────────────────────────────────────────────────── */
.aos-program-grid {
    overflow-x: auto;
    margin-bottom: 30px;
}

.aos-program-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
    font-size: 0.88em;
}

.aos-program-table th {
    background: var(--aospf-primary);
    color: #fff;
    padding: 10px 14px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}

.aos-program-table th.time-col {
    background: #135e96;
    width: 72px;
}

.aos-program-table td {
    border: 1px solid var(--aospf-border);
    vertical-align: top;
    padding: 0;
    min-width: 180px;
}

.aos-time-cell-fe {
    padding: 10px;
    font-size: 0.82em;
    font-weight: 700;
    color: var(--aospf-muted);
    background: #f1f3f5;
    white-space: nowrap;
    text-align: right;
    border-right: 2px solid var(--aospf-border);
}

/* ── Tarjeta de Ponencia (Frontend) ─────────────────────────────────────────── */
.aos-fe-slot {
    padding: 12px 14px;
    border-left: 4px solid var(--aospf-primary);
    background: #f8fbff;
    min-height: 80px;
    transition: background .15s;
}

.aos-fe-slot:hover {
    background: #eef4fc;
}

.aos-fe-slot.is-activity {
    background: #fffbf4;
    border-left-color: #c7532a;
}

.aos-fe-slot.is-global {
    background: #f5f0fa;
    border-left-color: #8a3fbf;
    text-align: center;
    font-weight: 600;
    color: #5a2b8f;
}

.aos-fe-slot-title {
    font-weight: 700;
    color: var(--aospf-text);
    margin-bottom: 6px;
    line-height: 1.35;
    font-size: 0.92em;
}

.aos-fe-slot-author {
    font-size: 0.82em;
    color: var(--aospf-muted);
    margin-bottom: 4px;
}

.aos-fe-slot-thematic {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    background: #e8f0fa;
    color: var(--aospf-primary);
    font-weight: 600;
    margin-top: 4px;
}

.aos-fe-slot-desc {
    margin-top: 10px;
    font-size: 0.82em;
    color: var(--aospf-text);
    line-height: 1.4;
    border-top: 1px dotted var(--aospf-border);
    padding-top: 8px;
}

.aos-fe-slot-desc p {
    margin: 0 0 6px 0;
}

.aos-fe-slot-desc p:last-child {
    margin-bottom: 0;
}

.aos-fe-slot-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* ── Favoritos ──────────────────────────────────────────────────────────────── */
.aos-fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    color: var(--aospf-muted);
    transition: color .15s, transform .1s;
}

.aos-fav-btn:hover {
    color: #e63946;
    transform: scale(1.2);
}

.aos-fav-btn.active {
    color: #e63946;
}

/* ── Sala Virtual ───────────────────────────────────────────────────────────── */
.aos-room-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    color: var(--aospf-primary);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--aospf-primary);
    border-radius: 4px;
    padding: 2px 8px;
    transition: background .15s, color .15s;
}

.aos-room-link:hover {
    background: var(--aospf-primary);
    color: #fff;
}

/* ── Mi Programación ────────────────────────────────────────────────────────── */
.aos-my-schedule {
    padding: 4px 0;
}

.aos-my-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--aospf-border);
    margin-bottom: 20px;
}

.aos-my-tab-btn {
    padding: 10px 20px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--aospf-muted);
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.aos-my-tab-btn.active {
    color: var(--aospf-primary);
    border-bottom-color: var(--aospf-primary);
}

.aos-my-tab-panel {
    display: none;
}

.aos-my-tab-panel.active {
    display: block;
}

/* Tarjeta de Mi Ponencia */
.aos-my-slot-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--aospf-card);
    border: 1px solid var(--aospf-border);
    border-left: 5px solid var(--aospf-primary);
    border-radius: var(--aospf-radius);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.aos-my-slot-card.is-draft {
    border-left-color: var(--aospf-primary);
}

.aos-my-slot-card.is-final {
    border-left-color: #107c10;
}

.aos-my-slot-time {
    flex-shrink: 0;
    text-align: center;
    background: var(--aospf-bg);
    border-radius: var(--aospf-radius);
    padding: 10px 14px;
    min-width: 70px;
}

.aos-my-slot-time .day {
    font-size: 0.7em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--aospf-muted);
}

.aos-my-slot-time .hour {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--aospf-text);
}

.aos-my-slot-info {
    flex: 1;
}

.aos-my-slot-info h4 {
    margin: 0 0 6px;
    font-size: 1em;
}

.aos-my-slot-info p {
    margin: 0;
    font-size: 0.85em;
    color: var(--aospf-muted);
}

/* ── Modal de Indisponibilidad ──────────────────────────────────────────────── */
.aos-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.aos-modal-overlay.active {
    display: flex;
}

.aos-modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 32px;
    max-width: 520px;
    width: 95%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    position: relative;
}

.aos-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--aospf-muted);
    line-height: 1;
}

.aos-modal-close:hover {
    color: var(--aospf-text);
}

/* Rango horario de indisponibilidad */
.aos-unavail-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.aos-unavail-range input {
    padding: 7px 10px;
    border: 1px solid var(--aospf-border);
    border-radius: 4px;
}

.aos-unavail-range .remove-range {
    cursor: pointer;
    color: #e63946;
    font-size: 18px;
    background: none;
    border: none;
}

/* ── Sistema de Valoraciones (Estrellas) ────────────────────────────────────── */
.aos-rating-widget {
    margin-top: 10px;
}

.aos-stars {
    display: flex;
    gap: 2px;
}

.aos-star {
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: #cdd1d6;
    padding: 0 1px;
    line-height: 1;
    transition: color .1s, transform .1s;
}

.aos-star:hover,
.aos-star.filled,
.aos-star.hovered {
    color: #f59e0b;
}

.aos-star:hover {
    transform: scale(1.2);
}

.aos-rating-avg {
    font-size: 0.8em;
    color: var(--aospf-muted);
    margin-top: 4px;
    display: block;
}

/* ── Vista Compacta ─────────────────────────────────────────────────────────── */
.aos-compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aos-compact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--aospf-border);
    font-size: 0.9em;
    transition: background .1s;
}

.aos-compact-item:hover {
    background: var(--aospf-bg);
}

.aos-compact-time {
    font-weight: 700;
    color: var(--aospf-primary);
    min-width: 90px;
    font-size: 0.85em;
}

.aos-compact-title {
    flex: 1;
    font-weight: 600;
}

.aos-compact-loc {
    font-size: 0.8em;
    color: var(--aospf-muted);
}

/* ── Estado Vacío ───────────────────────────────────────────────────────────── */
.aos-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--aospf-muted);
}

.aos-empty-state .aos-icon {
    font-size: 48px;
    color: var(--aospf-border);
    margin-bottom: 12px;
}

.aos-empty-state h3 {
    margin: 0 0 8px;
    color: var(--aospf-text);
}

.aos-empty-state p {
    margin: 0;
    font-size: 0.9em;
}

/* ── Animaciones ────────────────────────────────────────────────────────────── */
@keyframes aosFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aos-fe-slot,
.aos-my-slot-card {
    animation: aosFadeIn .25s ease;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .aos-program-filters {
        flex-direction: column;
    }

    .aos-program-table th,
    .aos-program-table td {
        min-width: 120px;
    }

    .aos-my-slot-card {
        flex-direction: column;
    }
}