/* ==========================================
   PROGRAMAÇÃO - ESTILOS RESPONSIVOS
   ========================================== */

/* Versão Desktop - Padrão */
.desktop-schedule {
    display: block;
}

.mobile-schedule {
    display: none;
}

/* Estilos padrão para desktop */
.schedule-cards {
    display: none;
}

.schedule-card {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.schedule-card .time {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.schedule-card .session {
    text-align: left;
}

/* ==========================================
   ESTILOS MOBILE
   ========================================== */
@media only screen and (max-width: 768px) {
    /* Ocultar versão desktop */
    .desktop-schedule {
        display: none;
    }
    
    /* Mostrar versão mobile */
    .mobile-schedule {
        display: block;
    }
    
    /* Seletor de dias mobile */
    .mobile-day-selector {
        margin-bottom: 30px;
    }
    
    .mobile-day-selector .form-select {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
        border: 2px solid #ddd;
        border-radius: 8px;
        background-color: #fff;
        color: #333;
        font-weight: 600;
    }
    
    .mobile-day-selector .form-select:focus {
        border-color: #df01ae;
        outline: none;
        box-shadow: 0 0 5px rgba(223, 1, 174, 0.3);
    }
    
    /* Título do dia mobile */
    .mobile-day-title {
        font-size: 20px;
        font-weight: 700;
        color: #df01ae;
        text-align: center;
        margin-bottom: 25px;
        padding: 15px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 8px;
        border-left: 4px solid #df01ae;
    }
    
    /* Seção de sala mobile */
    .mobile-room-section {
        margin-bottom: 30px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }
    
    /* Título da sala mobile */
    .mobile-room-title {
        font-size: 18px;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(135deg, #df01ae 0%, #b8016d 100%);
        padding: 15px 20px;
        margin: 0;
        text-align: center;
    }
    
    /* Container das sessões mobile */
    .mobile-sessions {
        padding: 20px;
    }
    
    /* Card de sessão mobile */
    .mobile-session-card {
        display: flex;
        margin-bottom: 20px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .mobile-session-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    }
    
    .mobile-session-card:last-child {
        margin-bottom: 0;
    }
    
    /* Horário da sessão mobile */
    .mobile-session-time {
        background: linear-gradient(135deg, #343a40 0%, #495057 100%);
        color: #fff;
        padding: 15px 12px;
        font-weight: 700;
        font-size: 14px;
        min-width: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }
    
    /* Conteúdo da sessão mobile */
    .mobile-session-content {
        padding: 15px;
        flex: 1;
        background: #fff;
    }
    
    .mobile-session-content h6 {
        font-size: 16px;
        font-weight: 700;
        color: #333;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .mobile-speaker {
        color: #df01ae;
        font-size: 14px;
        margin-bottom: 10px;
        font-style: italic;
    }
    
    /* Subtópicos mobile */
    .mobile-subtopics {
        margin-top: 10px;
    }
    
    .mobile-subtopic {
        font-size: 13px;
        color: #666;
        padding: 5px 0;
        border-left: 3px solid #e9ecef;
        padding-left: 10px;
        margin-bottom: 5px;
        line-height: 1.4;
    }
    
    .mobile-subtopic:last-child {
        margin-bottom: 0;
    }
}

/* ==========================================
   AJUSTES PARA TABLETS
   ========================================== */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    /* Melhorar visualização em tablets */
    .schedule-tabs .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .schedule-tabs .nav-tabs .nav-item {
        margin-bottom: 10px;
    }
    
    .schedule-table table {
        font-size: 14px;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 10px 8px;
    }
}

/* ==========================================
   AJUSTES PARA TELAS PEQUENAS
   ========================================== */
@media only screen and (max-width: 480px) {
    .mobile-session-time {
        min-width: 70px;
        font-size: 12px;
        padding: 12px 8px;
    }
    
    .mobile-session-content {
        padding: 12px;
    }
    
    .mobile-session-content h6 {
        font-size: 15px;
    }
    
    .mobile-day-title {
        font-size: 18px;
        padding: 12px;
    }
    
    .mobile-room-title {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .mobile-sessions {
        padding: 15px;
    }
}

/* Media query para dispositivos móveis */
@media (max-width: 768px) {
    /* Esconder versão desktop */
    .schedule-table {
        display: none !important;
    }
    
    .desktop-schedule {
        display: none !important;
    }
    
    /* Mostrar versão mobile */
    .schedule-cards {
        display: block;
    }
    
    .mobile-day-selector {
        display: block;
    }
    
    .mobile-day-content {
        display: block;
    }
    
    /* Ajustes nos cards para mobile */
    .schedule-card {
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .schedule-card .time {
        font-size: 14px;
        color: #000;
        font-weight: 600;
    }
    
    .schedule-card .session {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .schedule-card .session strong {
        color: #333;
        display: block;
        margin-bottom: 5px;
    }
    
    .mobile-room-title {
        font-size: 16px;
        margin-bottom: 10px;
        padding: 8px 12px;
    }
}

/* ==========================================
   ANIMAÇÕES E TRANSIÇÕES
   ========================================== */
.mobile-day-content {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.mobile-session-card {
    animation: slideInUp 0.3s ease-out;
}

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

/* ==========================================
   ESTADOS DE LOADING E INTERAÇÃO
   ========================================== */
.mobile-day-selector .form-select:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
}

.mobile-session-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================
   ACESSIBILIDADE
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .mobile-session-card,
    .mobile-day-content {
        animation: none;
        transition: none;
    }
}

/* Alto contraste para melhor legibilidade */
@media (prefers-contrast: high) {
    .mobile-session-card {
        border: 2px solid #000;
    }
    
    .mobile-session-time {
        background: #000;
        color: #fff;
    }
    
    .mobile-room-title {
        background: #000;
        color: #fff;
    }
}