/* =========================================================
   Battle Barge — Notifications Panel (shared)
   Slide-in side panel for in-app notifications. Styled with
   bb-tokens so the same file works under both data-universe="hh"
   and data-universe="tow" — colors absorb the universe skin
   automatically.
   ========================================================= */

/* -- Backdrop overlay -- */

#notifications-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
}

#notifications-overlay.visible {
    display: block;
}

/* -- Slide-in panel -- */

#notifications-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    max-width: 92vw;
    height: 100dvh;
    background: var(--bb-bg-surface);
    border-left: 1px solid var(--bb-border);
    box-shadow: var(--bb-shadow-lg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right var(--bb-transition-base);
    overflow: hidden;
}

#notifications-panel.open {
    right: 0;
}

/* -- Panel header -- */

.notifications-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bb-space-4);
    border-bottom: 1px solid var(--bb-border);
    flex-shrink: 0;
    background: var(--bb-bg-elevated);
}

.notifications-panel-header h3 {
    font-family: var(--bb-font-display);
    color: var(--bb-accent-primary);
    font-size: var(--bb-text-base);
    margin: 0;
}

.notifications-panel-header-actions {
    display: flex;
    align-items: center;
    gap: var(--bb-space-2);
}

/* -- Push toggle row -- */

#notifications-push-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bb-space-2) var(--bb-space-4);
    border-bottom: 1px solid var(--bb-border);
    font-size: var(--bb-text-sm);
    color: var(--bb-text-secondary);
    flex-shrink: 0;
}

.push-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--bb-space-2);
}

/* -- Notification list -- */

#notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--bb-space-2) 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--bb-space-2);
    padding: var(--bb-space-2) var(--bb-space-4);
    border-bottom: 1px solid var(--bb-border);
    cursor: pointer;
    transition: background var(--bb-transition-fast);
    position: relative;
}

.notification-item:hover {
    background: var(--bb-bg-elevated);
}

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

.notification-unread {
    background: color-mix(in srgb, var(--bb-accent-primary) 6%, var(--bb-bg-surface));
}

.notification-unread:hover {
    background: color-mix(in srgb, var(--bb-accent-primary) 10%, var(--bb-bg-elevated));
}

.notification-icon {
    font-size: var(--bb-text-lg);
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: var(--bb-text-sm);
    color: var(--bb-text-primary);
    margin: 0 0 2px;
    line-height: 1.4;
}

.notification-time {
    font-size: var(--bb-text-xs);
    color: var(--bb-text-muted);
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bb-accent-primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* -- Empty state -- */

.notifications-empty {
    text-align: center;
    padding: var(--bb-space-8) var(--bb-space-4);
    color: var(--bb-text-muted);
}
