/* ══════════════════════════════════════════════════════════════
   Notification bell + dropdown panel
   Built on main.css's design tokens — inherits light/dark theme
   automatically, same as onboarding.css.
   ══════════════════════════════════════════════════════════════ */

.notif-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--navbar-text-dim);
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.notif-bell-btn svg {
    width: 19px;
    height: 19px;
}

.notif-bell-btn:hover,
.notif-bell-btn.is-active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--navbar-gold);
}

.notif-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--navbar-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

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

.notif-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: -8px;
    width: min(380px, 92vw);
    max-height: 480px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 500;
    animation: notifPanelIn 0.16s ease;
}

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

@keyframes notifPanelIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.notif-panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

#notifMarkAllBtn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
}

#notifMarkAllBtn:hover {
    text-decoration: underline;
}

#notifMarkAllBtn[hidden] {
    display: none;
}

.notif-panel-body {
    overflow-y: auto;
    flex: 1 1 auto;
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    margin: 0;
}

.notif-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
}

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

.notif-item:hover {
    background: var(--bg-tertiary);
}

.notif-item.is-unread {
    background: color-mix(in srgb, var(--accent-primary) 6%, transparent);
}

.notif-item.is-unread:hover {
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.notif-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.notif-item-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
}

.notif-item.is-read .notif-item-dot {
    visibility: hidden;
}

.notif-item-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
}

.notif-item-category.category-feature {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.notif-item-category.category-maintenance {
    background: var(--gold-light);
    color: var(--gold);
}

.notif-item-category.category-announcement {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.notif-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.notif-item-body {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0 0 4px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.notif-item-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

@media (max-width: 860px) {
    .notif-wrap {
        position: static;
    }

    .notif-panel {
        position: fixed;
        top: calc(58px + env(safe-area-inset-top, 0px));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: min(72dvh, 560px);
        z-index: 800;
    }

    .notif-panel-header {
        flex-wrap: wrap;
        gap: 8px 12px;
        align-items: flex-start;
    }

    .notif-panel-header h3 {
        font-size: 16px;
        flex: 1 1 auto;
        min-width: 0;
    }

    #notifMarkAllBtn {
        font-size: 13px;
        white-space: normal;
        text-align: right;
        max-width: 100%;
        line-height: 1.3;
    }

    .notif-item {
        padding: 14px 16px;
    }

    .notif-item-title {
        font-size: 15px;
    }

    .notif-item-body {
        font-size: 14px;
        line-height: 1.5;
    }
}

.welcome-notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5, 20px);
    background: rgba(10, 12, 16, .58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

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

.welcome-notif-modal {
    position: relative;
    width: min(420px, 100%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 36px 30px 28px;
    text-align: center;
    animation: notifPanelIn 0.18s ease;
}

.welcome-notif-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
}

.welcome-notif-close:hover {
    color: var(--text-primary);
}

.welcome-notif-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 14px;
}

.welcome-notif-title {
    margin: 0 0 12px;
    font-family: var(--font-display, inherit);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.welcome-notif-body {
    margin: 0 0 24px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
}

.welcome-notif-ok {
    min-width: 160px;
}
