/* ============================================================================
   Sistema de Notas por Departamento - Estilos para resaltado visual
   ========================================================================== */

/* Resaltado general para elementos con notas sin leer */
.note-unread {
    position: relative;
    background: rgba(245, 158, 11, 0.08) !important;
    border: 1px solid #fbbf24 !important;
    border-radius: 6px;
    padding: 2px 6px !important;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3), 
                0 0 8px rgba(245, 158, 11, 0.2);
}

.note-unread:hover {
    background: rgba(245, 158, 11, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.5), 
                0 0 12px rgba(245, 158, 11, 0.35);
}

/* Badge de notificación sin leer */
.note-unread::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    margin-left: 4px;
    animation: pulse-notification 2s infinite;
}

@keyframes pulse-notification {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Link de notas */
.status-note-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.status-note-link:not(.note-unread):hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Indicador visual de nota sin leer en status pills */
.status-pill.note-unread,
.status-dot.note-unread {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Notificación flotante para nuevas notas */
.notification-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 1rem 1.5rem;
    max-width: 350px;
    z-index: 9999;
    animation: slideInUp 0.3s ease;
}

.notification-toast.success {
    border-left-color: #10b981;
}

.notification-toast.warning {
    border-left-color: #f59e0b;
}

.notification-toast.error {
    border-left-color: #ef4444;
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-toast .notification-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.notification-toast .notification-message {
    font-size: 0.85rem;
    color: #6b7280;
}

.notification-toast .notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-toast .notification-close:hover {
    color: #374151;
}

/* Badge de contador de notas sin leer */
.unread-notes-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #f59e0b;
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
}

/* Modal de notas (lectura) */
.notes-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.notes-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.notes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.notes-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.notes-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.notes-modal-close:hover {
    color: #111827;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
}

.note-item.unread {
    background: #fef7ed;
    border-color: #fbbf24;
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.2);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.note-item-author {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.note-item-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

.note-item-text {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.note-item-status {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .notes-modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}
