/* In-app notifications: bell badge, dropdown feed, live toasts (issue #934). */

.notification-menu {
    position: relative;
}

.notification-bell-btn {
    position: relative;
    background: none;
    border: none;
    /* The sibling header icons get their colour from a Vue-scoped rule this button
       isn't tagged for, so set the same tokens here — white on the dark header,
       dark once the header goes sticky/light. */
    color: var(--color-fg-interactive-inverse, #fff);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.header--sticky .notification-bell-btn {
    color: var(--color-fg-interactive, #1e1e1e);
}

.notification-bell-btn i {
    font-size: 1.25rem;
}

/* No dropdown caret — just the bell. */
.notification-bell-btn.dropdown-toggle::after {
    display: none;
}

/* Dropdown panel of recent notifications. */
.notification-dropdown.dropdown-menu {
    width: 340px;
    max-width: 90vw;
    padding: 0;
    /* Force a clean light card regardless of any inherited dark dropdown theme
       (the header's other dropdown is dropdown-menu-dark; this one is not). The
       theme overrides these with higher specificity, so win with !important. */
    --bs-dropdown-bg: #ffffff;
    --bs-dropdown-color: #212529;
    --bs-dropdown-link-color: #212529;
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--lx-shadow-lg);
}

/* Text colours are set explicitly (not inherited) so the dark theme can't tint
   them grey-on-white. */
.notification-dropdown__header,
.notification-item,
.notification-item__title {
    color: #212529;
}

.notification-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.notification-dropdown__mark-all {
    font-size: 0.8rem;
    background: none;
    border: none;
    color: var(--lx-blue-solid);
    cursor: pointer;
    padding: 0;
}

.notification-list {
    max-height: 60vh;
    overflow-y: auto;
}

.notification-item {
    display: block;
    position: relative;
    padding: 0.6rem 0.75rem 0.6rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: inherit;
    text-decoration: none;
}

.notification-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Unread: a solid dot in the left gutter + a subtle tinted background. This is
   the primary, contrast-preserving state cue (not opacity, which dims text). */
.notification-item::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 0.95rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--lx-blue-solid);
}

.notification-item:not(.notification-item--read) {
    background: rgba(13, 110, 253, 0.05);
}

/* Read: drop the unread dot and soften the text colour — full opacity keeps
   contrast readable, unlike a blanket opacity reduction. */
.notification-item--read::before {
    background: transparent;
}

.notification-item--read .notification-item__title {
    font-weight: 500;
    color: var(--lx-text-muted);
}

.notification-item__title {
    font-weight: 700;
    font-size: 0.9rem;
}

.notification-item__body {
    font-size: 0.82rem;
    color: #555;
    margin-top: 0.15rem;
}

.notification-empty {
    padding: 1rem 0.75rem;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

/* Transient toasts on live arrival, stacked bottom-right. */
.notification-toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 90vw;
}

.notification-toast {
    width: 320px;
    max-width: 90vw;
    padding: 0.7rem 0.9rem;
    background: #212529;
    color: #fff;
    border-radius: 0.4rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-toast--clickable {
    cursor: pointer;
}

.notification-toast--leaving {
    opacity: 0;
    transform: translateX(1rem);
}

.notification-toast__title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-toast__body {
    font-size: 0.82rem;
    margin-top: 0.15rem;
    color: var(--lx-border-strong);
}
