/* Estilos para Sistema de Notificaciones y Calendario */

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Panel de Notificaciones */
#notifications-panel {
    animation: slideInRight 0.3s ease;
}

#notifications-panel::-webkit-scrollbar {
    width: 8px;
}

#notifications-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#notifications-panel::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 10px;
}

#notifications-panel::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* Notificaciones individuales */
.notification-item {
    position: relative;
    overflow: hidden;
}

.notification-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.notification-item:hover::before {
    left: 100%;
}

/* Badge de notificaciones */
#notification-badge {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Calendario */
#calendar-grid {
    position: relative;
}

.calendar-day {
    transition: all 0.3s ease;
}

.calendar-day:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

/* Eventos del calendario */
.calendar-event {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal de eventos */
#add-event-modal .login-card {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #notifications-panel {
        width: 90%;
        right: 5%;
        max-height: 70vh;
    }
    
    #calendar-grid {
        font-size: 0.85rem;
    }
    
    #upcoming-events {
        grid-template-columns: 1fr !important;
    }
    
    /* Toast notifications en móvil */
    [data-toast-id] {
        min-width: 280px !important;
        max-width: calc(100vw - 40px) !important;
        right: 20px !important;
        left: 20px !important;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    [data-toast-id] {
        min-width: 260px !important;
        padding: 12px 15px !important;
        font-size: 0.9rem !important;
    }
    
    [data-toast-id] .font-size-1-5rem {
        font-size: 1.2rem !important;
    }
}

/* Indicador de rol */
#role-indicator {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid currentColor;
    margin-left: 10px;
}

/* Efectos de hover para días del calendario */
.calendar-day-cell {
    position: relative;
    overflow: hidden;
}

.calendar-day-cell::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.calendar-day-cell:hover::after {
    width: 100%;
    height: 100%;
}

/* Animación para eventos próximos */
#upcoming-events > div {
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

#upcoming-events > div:nth-child(1) { animation-delay: 0.1s; }
#upcoming-events > div:nth-child(2) { animation-delay: 0.2s; }
#upcoming-events > div:nth-child(3) { animation-delay: 0.3s; }
#upcoming-events > div:nth-child(4) { animation-delay: 0.4s; }
#upcoming-events > div:nth-child(5) { animation-delay: 0.5s; }
#upcoming-events > div:nth-child(6) { animation-delay: 0.6s; }

/* Toast notifications */
.notification-toast {
    animation: slideInRight 0.3s ease;
}

/* Efecto de carga para el calendario */
.calendar-loading {
    position: relative;
}

.calendar-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-cyan), var(--color-secondary));
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Estilos para diferentes tipos de eventos */
.event-type-evento {
    border-left-color: #3b82f6;
}

.event-type-reunion {
    border-left-color: #8b5cf6;
}

.event-type-examen {
    border-left-color: #ef4444;
}

.event-type-festivo {
    border-left-color: #10b981;
}

.event-type-importante {
    border-left-color: #f59e0b;
}

/* Scroll suave para el panel de notificaciones */
#notifications-list {
    scroll-behavior: smooth;
}

/* Efecto de brillo en notificaciones no leídas */
.notification-unread {
    position: relative;
}

.notification-unread::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}
