/* ==========================================================
   1. GRID DE BOTONES DE FECHAS
   ========================================================== */
.tc-date-grid-container {
    display: grid;
    /* Crea columnas responsivas automáticamente */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
    height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.tc-trigger-modal-btn {
    background-color: #2c3e50;
    color: #ffffff;
    border: 1px solid #2c3e50;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.tc-trigger-modal-btn:hover {
    background-color: #1a252f;
    border-color: #1a252f;
    transform: translateY(-2px); /* Pequeño efecto de elevación */
}

/* ==========================================================
   2. ESTRUCTURA DEL MODAL (OVERLAY Y CONTENEDOR)
   ========================================================== */

/* Fondo oscuro que cubre toda la pantalla */
#tc-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Z-index alto para sobreponerse al header/footer de WP */
    
    /* Transiciones suaves para apertura/cierre */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Clase dinámica que el JS añade/quita para ocultar el modal */
#tc-checkout-modal.tc-modal-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* La caja blanca central donde se inyecta Tickera */
.tc-modal-content {
    background-color: #ffffff;
    padding: 40px 30px 30px;
    border-radius: 8px;
    width: 900px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-height: 90vh; /* Evita que el modal sea más alto que la pantalla */
    overflow-y: auto; /* Permite scroll interno si el componente de Tickera es muy largo */
}

/* ==========================================================
   3. ELEMENTOS INTERNOS DEL MODAL
   ========================================================== */

/* Botón de cierre (X) */
.tc-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.tc-modal-close:hover {
    color: #e74c3c; /* Cambia a rojo al hacer hover */
}

/* Contenedor donde aterriza el HTML procesado por AJAX */
#tc-tickera-component-wrapper {
    min-height: 100px; /* Altura mínima para evitar que el modal "salte" visualmente mientras carga */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.buy-modal-container {
    display: flex;
    flex-direction: row;
    width: 700px;
    gap: 30px;
    margin-top: 10px;
    min-height: 100px;
}

.buy-modal-container .img-product-container, #tc-tickera-component-wrapper {
    width:45%;
    height: auto;
}

.tc-modal-left-column {
    flex: 1; /* Toma el 50% del espacio */
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 40%;
}

.tc-modal-right-column {
    flex: 1; /* Toma el otro 50% */
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    /* Neutralizamos sombras externas exageradas del tema para evitar dobles cuadros */
    box-shadow: 0 2px 15px rgba(0,0,0,0.06); 
    border: 1px solid #eaeaea;
    position: relative; /* Fuerza al componente de Tickera a no flotar fuera de la caja */
}

/* Forzar reset a la tabla de Tickera para que no rompa la columna derecha */
.tc-modal-right-column table.event_tickets {
    margin: 0 !important;
    width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Adaptabilidad para móviles */
@media (max-width: 768px) {
    .buy-modal-container {
        flex-direction: column;
    }
    .tc-modal-left-column,
    .tc-modal-right-column {
        width: 100%;
    }
    /* En móvil, la imagen y texto van arriba, el cobro abajo */
    .tc-modal-content {
        padding: 30px 20px 20px;
    }
}

/*
NUEVO CSS PARA RENDERIZADO DE CARTELERA Y EVENTOS PRÓXIMOS
*/

/* ==========================================================
   CARTELERA DE IMÁGENES (2 COLUMNAS PC / 1 MÓVIL)
   ========================================================== */
.tc-master-billboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.tc-event-image-card {
    display: block;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tc-event-image-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; 
}

.tc-event-image-card:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

@media (max-width: 768px) {
    .tc-master-billboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   BARRA LATERAL DE EVENTOS (tc_upcoming_sidebar)
   ========================================================== */
.tc-upcoming-sidebar-wrapper {
    font-family: inherit;
}

.tc-sidebar-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.tc-upcoming-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tc-upcoming-list li {
    margin-bottom: 20px;
}

.tc-upcoming-item-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.tc-upcoming-item-link:hover .tc-title {
    text-decoration: underline;
}

.tc-upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
    margin-right: 15px;
    margin-top: 2px;
}

.tc-month {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    line-height: 1;
    margin-bottom: 2px;
}

.tc-day {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}

.tc-upcoming-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tc-time {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.tc-title {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    line-height: 1.3;
}