/* Estilos generales */
:root {
    --time-column-width: 30px;
}

body {
    font-family: 'Montserrat', sans-serif !important;
    /* margin: 0; <-- Eliminado para no afectar el layout del tema */
    background-color: #fff;
}

.agenda-grid-instance {
    font-family: 'Montserrat', sans-serif !important;
    min-width: 900px; /* Ancho mínimo para forzar el scroll en contenedores más pequeños */
}

.header, .content-wrapper {
    display: grid;
    grid-template-columns: var(--time-column-width) repeat(6, 1fr);
}

.header {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: white;
    column-gap: 2px;
}

.content-wrapper {
    position: relative;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    font-weight: bold;
    font-size: 12px;
}

.header .room-header:first-of-type {
    border-left: none;
}

.room-header small {
    font-weight: 400;
    color: #666;
    margin-left: 10px; /* Añade espacio entre el título y el subtítulo */
}

.time-slot {
    grid-column: 1 / -1; /* Ocupa todas las columnas de su grilla padre */
    display: grid;
    grid-template-columns: var(--time-column-width) repeat(6, 1fr);
    height: 250px;
    position: relative;
    column-gap: 2px;
}

.time-slot:not(:last-of-type)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: white;
    z-index: 1;
}

.time-label {
    padding: 10px 8px;
    text-align: right;
    font-weight: bold;
    font-size: 12px;
    background-color: #fff;
    grid-column: 1 / 2;
}

.room-cell {
    background-color: #f9f9f9;
}

.time-slot .room-cell:first-of-type {
    border-left: none;
}

.talk {
    z-index: 1;
    padding: 8px;
    box-sizing: border-box;
    font-size: 13px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.talk:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(89, 13, 11, 0.2);
}

.talk.opening {
    background-color: #590D0B;
    color: white;
    border: 1px solid #590D0B;
}

.talk.speaker {
    background-color: #FF934A;
    color: white;
    border: 1px solid #FF934A;
}

.talk.event {
    background-color: white;
    color: #333;
    border: 1px solid #590D0B;
}

.talk.event .talk-title {
    color: #590D0B;
}

.talk.event .talk-time {
    color: #590D0B;
}

.talk-time {
    font-size: 11px;
    margin-bottom: 4px;
    line-height: 1.2;
}
.talk-title {
    font-weight: 900;
    line-height: 1.3;
}

/* Estilos del Modal */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.modal-content {
    background: none;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset;
    min-height: unset;
    max-width: unset;
    max-height: unset;
    position: relative;
    overflow: visible;
}

.modal-flyer {
    flex: none;
    background: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    border-radius: 0;
    overflow: visible;
    height: auto;
    width: auto;
    box-shadow: none;
}

.modal-flyer img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: block;
    margin: 0;
    padding: 0;
}

.modal-flyer::before,
.modal-flyer-content,
.modal-flyer .event-time,
.modal-flyer .event-room {
    display: none !important;
}

.close {
    position: absolute;
    top: 0;
    right: 0;
    width: 35px;
    height: 35px;
    background-color: #e62b1e;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
    margin: 0;
    padding: 0;
    /* Opcional: que sobresalga un poco */
    transform: translate(50%,-50%);
}

.close:hover {
    transform: scale(1.1) translate(50%,-50%);
    background-color: #c02113;
    color: white !important;
}

.modal-content-section,
.modal-content-section.speaker-view,
.speaker-view .close,
.speaker-profile,
.speaker-photo img,
.speaker-bio .modal-title,
.speaker-bio p,
.speaker-bio .speaker-company,
.speaker-bio .speaker-role,
.speaker-bio .speaker-country,
.speaker-view .modal-details,
.speaker-view .modal-details p {
    display: none !important;
}

@media (max-width: 768px) {
    .modal-flyer img {
        max-width: 98vw;
        max-height: 80vh;
    }
    .close {
        top: 4px;
        right: 4px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

body.modal-open {
    overflow: hidden !important;
}

/* Eliminamos los estilos específicos de speaker-view ya que no se usarán */
.modal-content-section.speaker-view,
.speaker-view .close,
.speaker-profile,
.speaker-photo img,
.speaker-bio .modal-title,
.speaker-bio p,
.speaker-bio .speaker-company,
.speaker-bio .speaker-role,
.speaker-bio .speaker-country,
.speaker-view .modal-details,
.speaker-view .modal-details p {
    display: none;
}

/* Eliminamos los media queries específicos del modal que ya no aplican */
@media (max-width: 1100px) {
    .modal-flyer {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .modal-flyer {
        flex: 1;
    }
}

/* Contenedor para eventos */
.event-container {
    position: absolute;
    left: 5px;
    right: 5px;
    background: #FF6B4A;
    color: white;
    padding: 8px;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    z-index: 1;
}

.event-container.opening {
    background: #8B0000;
}

.event-container.pause {
    background: #E5E5E5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-container .time {
    font-size: 10px;
    margin-bottom: 4px;
    opacity: 0.9;
    font-weight: 500;
}

.event-container .title {
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.event-container .speaker {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 2px;
}

/* Responsive */
.agenda-container-wrapper {
    overflow-x: auto; /* Activa el scroll horizontal solo para este contenedor */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}

@media (max-width: 1024px) {
    /* En pantallas de 1024px o menos, se reducen las fuentes y se fija el ancho de las columnas */
    .agenda-grid-instance .header, .agenda-grid-instance .content-wrapper {
        grid-template-columns: var(--time-column-width) repeat(6, 165.5px); /* Ancho fijo para las salas */
    }

    .agenda-grid-instance {
        width: 1024px; /* Ancho total fijo: 30px (hora) + 6*150px (salas) + 5*2px (gaps) */
        min-width: 0; /* Anulamos el min-width anterior para que el width fijo tome control */
    }

    .room-header {
        font-size: 11px;
    }
    
    .talk-title {
        font-size: 12px;
    }
    
    .talk-time {
        font-size: 10px;
    }
}

@media (max-width: 1100px) {
    .modal-flyer {
        flex: 0 0 300px;
        max-width: 300px;
    }
    .modal-content-section {
        max-width: calc(100% - 300px);
    }
}

@media (max-width: 900px) {
    .modal-flyer {
        flex: 0 0 200px;
        max-width: 200px;
    }
    .modal-content-section {
        max-width: calc(100% - 200px);
    }
} 