/* =============================================================================
   Notification center — nav bell dropdown
   Theme-variable driven so it tracks light / dark / high-contrast themes.
   Matches the visual language of the campaign-quick-message panel and the
   existing nav dropdowns.
   ============================================================================= */

.notif-dropdown {
    width: 340px;
    max-width: calc(100vw - 1rem);
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-lg, 0.75rem);
    border: 1px solid var(--border-medium, #c2bbb1);
    box-shadow: var(--shadow-xl, 0 20px 25px rgba(0, 0, 0, 0.15));
    background: var(--card-bg, #f7f4f0);
    color: var(--text-primary, #2c2825);
}

/* Header --------------------------------------------------------------- */
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--card-header-bg, #edeae3);
    border-bottom: 1px solid var(--border-light, #d4cec6);
}

.notif-header-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary, #2c2825);
}

/* List ----------------------------------------------------------------- */
.notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light, #d4cec6);
    transition: background-color 0.15s ease;
}

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

.notif-item:hover,
.notif-item:focus-visible {
    background: var(--card-header-bg, #edeae3);
    outline: none;
}

/* Leading unread dot — only visible on unread rows. */
.notif-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 0.45rem;
    border-radius: 50%;
    background: transparent;
}

.notif-item--unread {
    background: color-mix(in srgb, var(--brand-primary, #6b46c1) 8%, transparent);
}

.notif-item--unread .notif-item-dot {
    background: var(--brand-primary, #6b46c1);
}

.notif-item--unread .notif-item-title {
    font-weight: 700;
}

.notif-item-icon {
    flex-shrink: 0;
    width: 1.6rem;
    text-align: center;
    color: var(--brand-primary, #6b46c1);
    font-size: 0.95rem;
    margin-top: 0.1rem;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary, #2c2825);
    line-height: 1.25;
}

.notif-item-message {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b6560);
    line-height: 1.3;
    /* Clamp to a couple of lines so long messages don't bloat the row. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-muted, #9c948c);
    margin-top: 0.1rem;
}

/* Empty state ---------------------------------------------------------- */
.notif-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted, #9c948c);
}

.notif-empty[hidden] {
    display: none;
}

/* Footer --------------------------------------------------------------- */
.notif-footer {
    display: flex;
    justify-content: center;
    padding: 0.4rem 1rem;
    background: var(--card-header-bg, #edeae3);
    border-top: 1px solid var(--border-light, #d4cec6);
}

.notif-mark-all {
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--brand-primary, #6b46c1);
    padding: 0.1rem 0.25rem;
}

.notif-mark-all:hover {
    color: var(--brand-primary-hover, #553494);
    text-decoration: underline;
}

.notif-mark-all:disabled {
    color: var(--text-muted, #9c948c);
    opacity: 0.7;
}

/* Responsive: full-width-ish drop on small screens. */
@media (max-width: 576px) {
    .notif-dropdown {
        width: calc(100vw - 1rem);
    }
}
