/**
 * CSS para AEU Advanced Calendar Widget
 * Sin estilos inline - Todo controlable desde Elementor
 */

/* === ESTRUCTURA BÁSICA DEL CALENDARIO === */
.aeu-advanced-calendar-wrapper {
    position: relative;
    width: 100%;
}

/* === CABECERA DEL CALENDARIO === */
.aeu-advanced-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Botones de navegación con estilos base mejorados */
.aeu-nav-arrow {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666666;
    margin: 0 5px;
    min-width: 40px;
    min-height: 40px;
}

.aeu-nav-arrow:hover {
    background-color: #f5f5f5;
    color: #333333;
    transform: scale(1.05);
}

.aeu-nav-arrow:active {
    transform: scale(0.98);
}

.aeu-nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.aeu-nav-arrow:disabled:hover {
    background-color: transparent;
    transform: none;
}

/* Título del mes con especificidad mejorada */
.aeu-advanced-calendar-header .current-month-year {
    margin: 0;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

/* Asegurar que la tipografía no sea sobre-escrita */
.aeu-advanced-calendar-header .current-month-year,
.aeu-advanced-calendar-header h3 {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
}

/* === CALENDARIO === */
.aeu-advanced-calendar {
    width: 100%;
}

/* === DÍAS DE LA SEMANA === */
.aeu-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.aeu-weekday {
    position: relative;
    font-weight: 600;
    /* Estilos controlados desde Elementor */
}

/* === DÍAS DEL MES === */
.aeu-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.aeu-calendar-day {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    /* Estilos base controlados desde Elementor */
}

.aeu-calendar-day:hover {
    transform: translateY(-1px);
}

.aeu-calendar-day.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.aeu-calendar-day.other-month {
    opacity: 0.6;
}

.aeu-calendar-day.today {
    position: relative;
}

.aeu-calendar-day.today::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    z-index: 1;
}

.aeu-calendar-day.selected {
    /* Estilos controlados desde Elementor */
}

.day-number {
    display: block;
    line-height: 1.2;
    /* Estilos controlados desde Elementor */
}

/* === INDICADORES DE EVENTOS === */
.event-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 4px;
    justify-content: center;
    align-items: center;
    min-height: 12px;
}

.event-indicator {
    border-radius: 50%;
    flex-shrink: 0;
    /* Tamaño y color controlados desde Elementor */
}

/* === ESTADOS DE CARGA === */
.aeu-calendar-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.aeu-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: aeu-spin 1s linear infinite;
}

@keyframes aeu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === VISTA PREVIA DEL EDITOR === */
.aeu-preview-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
    grid-column: span 7;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .aeu-advanced-calendar-header {
        padding: 10px;
    }

    .aeu-nav-arrow {
        padding: 6px;
    }

    .current-month-year {
        font-size: 18px;
    }

    .aeu-calendar-day {
        min-height: 50px !important;
    }

    .day-number {
        font-size: 14px;
    }

    .event-indicators {
        gap: 1px;
        margin-top: 2px;
    }

    .event-indicator {
        width: 6px !important;
        height: 6px !important;
    }
}

@media (max-width: 480px) {
    .aeu-calendar-day {
        min-height: 40px !important;
    }

    .day-number {
        font-size: 12px;
    }

    .event-indicator {
        width: 4px !important;
        height: 4px !important;
    }
}

/* === ACCESIBILIDAD === */


/* === ANIMACIONES SUAVES === */
.aeu-calendar-day {
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

.event-indicator {
    transition: transform 0.2s ease;
}

.aeu-calendar-day:hover .event-indicator {
    transform: scale(1.2);
}

/* === COMPATIBILIDAD CON THEMES === */
.aeu-advanced-calendar-wrapper * {
    box-sizing: border-box;
}

.aeu-advanced-calendar-wrapper button {
    font-family: inherit;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .aeu-calendar-loading {
        background: rgba(40, 40, 40, 0.9);
    }

    .aeu-spinner {
        border-color: #555;
        border-top-color: #4a9eff;
    }

    .aeu-preview-message {
        background: #2c2c2c;
        border-color: #555;
        color: #ccc;
    }
}