/**
 * HR Hub Notification Center Styles
 * Sistema de notificaciones elegante y responsive
 * Integrado con el diseño existente del header
 */

/* ===== CONTENEDOR PRINCIPAL ===== */
.notification-center {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

/* ===== TOAST NOTIFICATIONS FOR REAL-TIME UPDATES ===== */
.notification-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notification-toast {
    display: flex;
    align-items: flex-start;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    padding: 16px;
    max-width: 400px;
    min-width: 300px;
    border-left: 4px solid var(--primary-color, #007bff);
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.3s ease-out forwards;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.notification-toast:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.notification-toast-high {
    border-left-color: var(--danger-color, #dc3545);
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.notification-toast-medium {
    border-left-color: var(--warning-color, #ffc107);
    background: linear-gradient(135deg, #fff 0%, #fffef5 100%);
}

.notification-toast-low {
    border-left-color: var(--success-color, #28a745);
    background: linear-gradient(135deg, #fff 0%, #f5fff5 100%);
}

.notification-toast-icon {
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.notification-toast-high .notification-toast-icon {
    color: var(--danger-color, #dc3545);
}

.notification-toast-medium .notification-toast-icon {
    color: var(--warning-color, #ffc107);
}

.notification-toast-low .notification-toast-icon {
    color: var(--success-color, #28a745);
}

.notification-toast-content {
    flex: 1;
    min-width: 0;
}

.notification-toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-color, #333);
    line-height: 1.3;
}

.notification-toast-message {
    font-size: 13px;
    color: var(--muted-color, #6c757d);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-toast-close {
    background: none;
    border: none;
    color: var(--muted-color, #6c757d);
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    margin-top: -2px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-toast-close:hover {
    background: var(--light-bg, #f8f9fa);
    color: var(--text-color, #333);
}

@keyframes slideInToast {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive toast adjustments */
@media (max-width: 768px) {
    .notification-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification-toast {
        min-width: auto;
        max-width: none;
    }
}

/* ===== BOTÓN TRIGGER ===== */
.notification-trigger {
    position: relative;
    background: none;
    border: none;
    color: var(--text-color, #333);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.notification-trigger:hover {
    background-color: var(--hover-bg, rgba(0, 0, 0, 0.1));
    color: var(--primary-color, #007bff);
}

.notification-trigger:focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}

/* ===== BADGE DE NOTIFICACIONES ===== */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--info-color, #17a2b8);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.notification-badge.high-priority {
    background: var(--danger-color, #dc3545);
    animation: pulse-notification 2s infinite;
}

@keyframes pulse-notification {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-badge.hidden {
    display: none;
}

/* ===== PANEL DESPLEGABLE ===== */
.notification-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 400px;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    color: #333 !important;
}

.notification-panel.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    display: none;
}

/* ===== HEADER DEL PANEL ===== */
.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5 !important;
    background: #f9f9f9 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #333);
}

.notification-count {
    font-size: 14px;
    color: var(--muted-color, #6c757d);
    font-weight: normal;
}

/* ===== LISTA DE NOTIFICACIONES ===== */
.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
    width: 4px;
}

.notification-list::-webkit-scrollbar-track {
    background: var(--light-bg, #f1f1f1);
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--border-color, #ccc);
    border-radius: 2px;
}

/* ===== ESTADO VACÍO ===== */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted-color, #6c757d);
}

.notification-empty i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 14px;
}

/* ===== ITEMS DE NOTIFICACIÓN ===== */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background-color: #e3f2fd !important;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.notification-high {
    border-left: 4px solid var(--danger-color, #dc3545);
}

.notification-item.notification-medium {
    border-left: 4px solid var(--warning-color, #ffc107);
}

.notification-item.notification-low {
    border-left: 4px solid var(--success-color, #28a745);
}

/* ===== ÍCONO DE NOTIFICACIÓN ===== */
.notification-icon {
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification-high .notification-icon {
    color: var(--danger-color, #dc3545);
}

.notification-medium .notification-icon {
    color: var(--warning-color, #e67e22);
}

.notification-low .notification-icon {
    color: var(--success-color, #28a745);
}

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

.notification-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color, #333);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted-color, #6c757d);
}

.notification-team {
    font-weight: 500;
}

.notification-time {
    font-style: italic;
}

/* ===== INDICADOR NO LEÍDA ===== */
.notification-unread-dot {
    position: absolute;
    top: 18px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: var(--primary-color, #007bff);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== FOOTER DEL PANEL ===== */
.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e5e5 !important;
    background: #f9f9f9 !important;
    text-align: center;
}

.notification-view-all {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.notification-view-all:hover {
    color: var(--primary-dark, #0056b3);
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 768px) {
    .notification-panel {
        width: 320px;
        right: -20px;
    }

    .notification-item {
        padding: 12px 15px;
    }

    .notification-header {
        padding: 12px 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .notification-panel {
        position: fixed;
        top: 60px !important;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }

    .notification-trigger {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .notification-badge {
        top: -3px;
        right: -3px;
        min-width: 16px;
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* ===== MODO OSCURO (preparado para futuro) ===== */
@media (prefers-color-scheme: dark) {
    .notification-panel {
        background: var(--dark-bg, #2d3748);
        border-color: var(--dark-border, #4a5568);
        color: var(--dark-text, #e2e8f0);
    }

    .notification-header {
        background: var(--dark-header, #1a202c);
        border-color: var(--dark-border, #4a5568);
    }

    .notification-item:hover {
        background-color: var(--dark-hover, #4a5568);
    }

    .notification-footer {
        background: var(--dark-header, #1a202c);
        border-color: var(--dark-border, #4a5568);
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .notification-trigger,
    .notification-panel,
    .notification-item {
        transition: none;
    }

    .notification-badge.high-priority {
        animation: none;
    }
}

/* ===== MEJORAS DE CONTRASTE ===== */
@media (prefers-contrast: high) {
    .notification-panel {
        border-width: 2px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }

    .notification-badge {
        border-width: 3px;
    }

    .notification-trigger:focus {
        outline-width: 3px;
    }
}