/*

Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/CascadeStyleSheet.css to edit this template
*/
/* 
    Created on : 16 mar. 2026
    Author     : tylopez
    Módulo     : Notificaciones
*/

/* ===== VARIABLES ESPECÍFICAS ===== */
:root {
    --notif-unread-bg: #f0f9ff;
    --notif-unread-border: #3b82f6;
    --notif-read-bg: #ffffff;
    --notif-hover-bg: #f8fafc;
    --notif-border: #e5e7eb;
    --notif-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --notif-radius: 12px;

    /* Colores por tipo */
    --notif-info: #3b82f6;
    --notif-info-bg: #dbeafe;
    --notif-success: #10b981;
    --notif-success-bg: #d1fae5;
    --notif-warning: #f59e0b;
    --notif-warning-bg: #fed7aa;
    --notif-error: #ef4444;
    --notif-error-bg: #fee2e2;
    --primary-green: #4EB06B;
    --primary-green-rgb: 78, 176, 107;
    --primary-green-dark: #3A8C52;
    --primary-green-light: #A9E0C2;

}

/* ===== OVERLAY PANEL ===== */
.notif-panel.ui-overlaypanel {
    border-radius: var(--notif-radius) !important;
    overflow: hidden !important;
    box-shadow: var(--notif-shadow) !important;
    border: 1px solid var(--notif-border) !important;
    margin-top: 5px !important;
}

.notif-panel.ui-overlaypanel:before,
.notif-panel.ui-overlaypanel:after {
    display: none !important;
}

.notif-panel .ui-overlaypanel-content {
    padding: 1rem !important;
    background: white;
}

/* ===== HEADER NOTIFICACIONES ===== */
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    border-bottom: 1px solid var(--notif-border);
    margin-bottom: 0.5rem;
}

.notif-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-header h5 i {
    color: var(--primary-green);
    font-size: 1.2rem;
}

.notif-header .mark-all-link {
    font-size: 0.85rem;
    color: var(--primary-green);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.notif-header .mark-all-link:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 176, 107, 0.2);
}

/* ===== LISTA DE NOTIFICACIONES ===== */
.notif-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -0.25rem;
}

/* Scroll personalizado */
.notif-list::-webkit-scrollbar {
    width: 6px;
}

.notif-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.notif-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* ===== ITEM DE NOTIFICACIÓN ===== */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    position: relative;
    border: 1px solid transparent;
}

.notif-item:hover {
    background: var(--notif-hover-bg);
    border-color: var(--gray-200);
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

/* Estado no leído */
.notif-unread {
    background: var(--notif-unread-bg);
    border-left: 3px solid var(--notif-unread-border);
}

.notif-read {
    background: var(--notif-read-bg);
}

/* Indicador de no leído */
.notif-indicator {
    width: 8px;
    height: 8px;
    background: var(--notif-unread-border);
    border-radius: 50%;
    display: inline-block;
    margin-top: 8px;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ===== ICONOS POR TIPO ===== */
.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon.info {
    background: var(--notif-info);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.notif-icon.info i {
    font-size: 1rem;
}

.notif-icon.success {
    background: var(--notif-success);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.notif-icon.success i {
    font-size: 1rem;
}

.notif-icon.warning {
    background: var(--notif-warning);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.notif-icon.warning i {
    font-size: 1rem;
}

.notif-icon.error {
    background: var(--notif-error);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.notif-icon.error i {
    font-size: 1rem;
}

/* ===== CONTENIDO DE NOTIFICACIÓN ===== */
.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-message {
    font-size: 0.8rem;
    color: var(--gray-600);
    display: block;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-date {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.notif-date i {
    font-size: 0.65rem;
    color: var(--gray-400);
}

/* ===== BOTÓN ELIMINAR ===== */
.notif-delete-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: var(--gray-400) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0;
}

.notif-delete-btn:hover {
    background: var(--notif-error-bg) !important;
    color: var(--notif-error) !important;
    transform: scale(1.1);
}

.notif-delete-btn .ui-button-text {
    padding: 0 !important;
}

.notif-delete-btn i {
    font-size: 0.8rem !important;
}

/* ===== FOOTER ===== */
.notif-footer {
    text-align: center;
    padding: 1rem 0.5rem 0.25rem 0.5rem;
    border-top: 1px solid var(--notif-border);
    margin-top: 0.5rem;
}

.notif-footer-link {
    color: var(--primary-green) !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--gray-50);
}

.notif-footer-link:hover {
    background: var(--primary-green);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 176, 107, 0.2);
}

.notif-footer-link i {
    font-size: 0.8rem;
}

/* ===== VACÍO ===== */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--gray-400);
    text-align: center;
}

.notif-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.notif-empty span {
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .notif-panel.ui-overlaypanel {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .notif-list {
        max-height: 70vh;
    }
}

.bell-shake{
    animation: bell 0.6s ease;
}

@keyframes bell{
    0%{
        transform:rotate(0)
    }
    25%{
        transform:rotate(20deg)
    }
    50%{
        transform:rotate(-20deg)
    }
    75%{
        transform:rotate(10deg)
    }
    100%{
        transform:rotate(0)
    }
}