/**
 * Estilos para el calendario público de eventos
 * 
 * @package WC_Evento
 * @since 1.5.3
 */

/* Contenedor del calendario */
.wc-evento-public-calendar-container {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#wc-evento-public-calendar {
    max-width: 100%;
}

/* Estilos de eventos */
.wc-evento-public-event {
    border: 1px solid #e0e0e0 !important;
    border-left-width: 4px !important;
    border-left-style: solid !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.wc-evento-public-event:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Punto de color de stock */
.fc-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* Contenido personalizado del evento */
.fc-event-main-frame {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.fc-event-title-time {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.fc-event-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.fc-event-time {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
    line-height: 1.2;
}

/* Modal */
.wc-evento-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.wc-evento-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-evento-modal-header {
    padding: 24px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.wc-evento-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.wc-evento-modal-close {
    color: white;
    float: right;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: -5px;
}

.wc-evento-modal-close:hover,
.wc-evento-modal-close:focus {
    transform: scale(1.2);
    opacity: 0.8;
}

.wc-evento-modal-body {
    padding: 30px;
}

/* Filas de detalles */
.evento-detail-row {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.evento-detail-row:last-child {
    border-bottom: none;
}

.evento-detail-label {
    flex: 0 0 180px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.evento-detail-label i {
    margin-right: 8px;
    color: #667eea;
    width: 20px;
    text-align: center;
}

.evento-detail-value {
    flex: 1;
    color: #333;
    font-size: 15px;
}

/* Botón de reservar */
.evento-booking-button {
    margin-top: 20px;
    text-align: center;
}

.evento-booking-button .button {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.evento-booking-button .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Indicador de carga */
.fc-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Spinner de WordPress */
.spinner {
    float: none;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-evento-public-calendar-container {
        padding: 10px;
    }
    
    .wc-evento-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .wc-evento-modal-header {
        padding: 20px;
    }
    
    .wc-evento-modal-header h2 {
        font-size: 20px;
    }
    
    .wc-evento-modal-body {
        padding: 20px;
    }
    
    .evento-detail-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    
    .evento-detail-label {
        flex: none;
        margin-bottom: 5px;
    }
    
    .evento-booking-button .button {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Mejoras visuales para FullCalendar */
.fc .fc-toolbar-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.fc .fc-button {
    background: #667eea;
    border-color: #667eea;
    text-transform: capitalize;
}

.fc .fc-button:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.fc .fc-button:disabled {
    opacity: 0.5;
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: #764ba2;
    border-color: #764ba2;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #e0e0e0;
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.fc .fc-col-header-cell {
    padding: 10px 0;
    font-weight: 600;
    color: #555;
}

/* Modal fullscreen para el calendario */
.wc-evento-fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.wc-evento-fullscreen-modal-content {
    background-color: #fefefe;
    margin: 20px auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wc-evento-fullscreen-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    position: relative;
    flex-shrink: 0;
}

.wc-evento-fullscreen-modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.wc-evento-fullscreen-modal-close {
    position: absolute;
    right: 30px;
    top: 20px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.wc-evento-fullscreen-modal-close:hover,
.wc-evento-fullscreen-modal-close:focus {
    transform: rotate(90deg);
    opacity: 0.8;
}

.wc-evento-fullscreen-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Botón para abrir el modal del calendario */
.wc-evento-calendar-button-wrapper {
    text-align: center;
    margin: 20px 0;
}

.wc-evento-open-calendar-modal {
    /* Usar estilos heredados de WooCommerce */
    display: inline-block;
    font-size: 16px;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--e-global-color-secondary) !important;
    color: white !important;
}

.wc-evento-open-calendar-modal:hover {
    opacity: 0.9;
}

.wc-evento-open-calendar-modal i {
    margin-right: 8px;
}

/* Responsive para modal fullscreen */
@media (max-width: 768px) {
    .wc-evento-fullscreen-modal-content {
        width: 98%;
        margin: 10px auto;
        max-height: 95vh;
    }
    
    .wc-evento-fullscreen-modal-header {
        padding: 15px 20px;
    }
    
    .wc-evento-fullscreen-modal-header h2 {
        font-size: 1.3em;
    }
    
    .wc-evento-fullscreen-modal-body {
        padding: 15px;
    }
    
    .wc-evento-fullscreen-modal-close {
        right: 15px;
        top: 15px;
        font-size: 28px;
    }
}
