/* public/assets/css/notification-modal.css */

/* Style pour le conteneur du bouton de notification dans la navbar */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px; /* Espace par rapport au menu utilisateur */
}

/* Style pour le bouton cloche */
#notification-bell-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge pour le compteur de notifications */
#notification-count-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #dc3545; /* Rouge vif */
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e1e1e; /* Bordure pour se détacher */
    transform: translate(40%, -40%);
    transition: transform 0.2s ease-out, opacity 0.2s;
}

#notification-count-badge.hidden {
    opacity: 0;
    transform: translate(40%, -40%) scale(0.5);
}

/* Overlay de la modale de notifications */
.nm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1040; /* Juste en dessous de la modale d'image */
    display: none; /* Caché par défaut */
}

/* Contenu de la modale */
.nm-modal-content {
    position: fixed; /* Fixé par rapport à la fenêtre */
    top: 65px; /* Positionné sous la navbar */
    right: 20px;
    width: 100%;
    max-width: 400px;
    background-color: #1e1e1e;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    z-index: 1041;
    display: none; /* Caché par défaut */
    flex-direction: column;
    max-height: 80vh;
    animation: nm-fade-in 0.3s ease-out;
}

@keyframes nm-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.nm-modal-header h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.nm-modal-body {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.nm-notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nm-notification-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s;
    gap: 15px;
    align-items: flex-start;
}

.nm-notification-item:last-child {
    border-bottom: none;
}

.nm-notification-item:hover {
    background-color: #2a2a2a;
}

.nm-notification-item a {
    text-decoration: none;
    color: inherit;
    display: contents; /* Permet au lien d'englober les enfants flex */
}

.nm-notification-item.is-unread {
    background-color: #282c34;
}

.nm-notification-icon {
    font-size: 20px;
    color: #aaa;
    margin-top: 3px;
    flex-shrink: 0;
}

.nm-notification-content {
    flex-grow: 1;
}

.nm-notification-title {
    font-weight: bold;
    margin: 0 0 5px 0;
    font-size: 0.95em;
    color: #fff;
}

.nm-notification-message {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #ccc;
    line-height: 1.4;
}

.nm-notification-date {
    font-size: 0.8em;
    color: #888;
}

.nm-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid #333;
    text-align: center;
    flex-shrink: 0;
}

.nm-modal-footer a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
}
.nm-modal-footer a:hover {
    text-decoration: underline;
}

#nm-no-notifications-msg {
    color: #888;
    padding: 40px 20px;
    text-align: center;
}

/* Scrollbar */
.nm-modal-body::-webkit-scrollbar {
    width: 6px;
}
.nm-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.nm-modal-body::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
}
