/* Notification Bell & Dropdown - Royal Heritage Theme */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--bl-danger);
    color: var(--bl-surface);
    font-size: 0.65rem;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    border-radius: var(--bl-radius-pill);
    font-weight: 800;
    border: 2px solid var(--bl-surface);
    z-index: 2;
    pointer-events: none;
    box-shadow: var(--bl-shadow-sm);
}

.notif-dropdown {
    position: fixed;
    top: calc(var(--bl-nav-height) + env(safe-area-inset-top, 0px) + var(--bl-space-2));
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius-lg);
    box-shadow: var(--bl-shadow-lg);
    z-index: 10005;
    overflow: hidden;
    animation: fadeInNotif 0.18s ease-out;
}

@keyframes fadeInNotif {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .notif-dropdown {
        right: var(--bl-space-3);
        left: var(--bl-space-3);
        width: auto;
        max-width: none;
    }
}

.notif-header {
    padding: 14px 18px;
    background: var(--bl-bg);
    border-bottom: 1px solid var(--bl-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    color: var(--bl-text-primary);
    font-size: 0.95rem;
}

.btn-mark-all {
    background: transparent;
    border: none;
    color: var(--bl-info);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 36px;
    padding: 0 var(--bl-space-2);
    border-radius: var(--bl-radius-sm);
}

.btn-mark-all:hover {
    color: var(--bl-primary);
    text-decoration: underline;
}

.notif-list {
    max-height: min(380px, calc(100vh - 160px));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bl-surface);
}

.notif-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--bl-surface-subtle);
    cursor: pointer;
    transition: background 0.15s ease;
    background: var(--bl-surface);
}

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

.notif-item.unread {
    background: var(--bl-info-soft);
    border-left: 3px solid var(--bl-secondary);
}

.notif-item .notif-type {
    font-size: var(--bl-text-xs);
    color: var(--bl-primary);
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notif-item .notif-msg {
    font-size: 0.88rem;
    color: var(--bl-text-primary);
    line-height: 1.45;
}

.notif-item .notif-time {
    font-size: 0.72rem;
    color: var(--bl-text-muted);
    margin-top: 6px;
    display: block;
}

.notif-actions {
    display: flex;
    gap: var(--bl-space-2);
    margin-top: 10px;
}

.btn-notif-accept,
.btn-notif-reject {
    min-height: 36px;
    padding: 6px 16px;
    border-radius: var(--bl-radius-sm);
    font-family: inherit;
    font-size: var(--bl-text-xs);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-notif-accept {
    background: var(--bl-primary);
    color: var(--bl-surface);
    border: 1px solid var(--bl-primary);
}

.btn-notif-accept:hover {
    background: var(--bl-primary-hover);
    border-color: var(--bl-primary-hover);
}

.btn-notif-reject {
    background: var(--bl-surface);
    color: var(--bl-danger);
    border: 1px solid var(--bl-danger);
}

.btn-notif-reject:hover {
    background: var(--bl-danger-soft);
}

@media (max-width: 600px) {
    .btn-notif-accept,
    .btn-notif-reject,
    .btn-mark-all {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notif-dropdown {
        animation: none;
    }
    .notif-item {
        transition: none;
    }
}

.hidden {
    display: none !important;
}


/* Empty / error states of the notification inbox */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bl-space-2);
    padding: var(--bl-space-6, 32px) var(--bl-space-4);
    color: var(--bl-text-muted);
    font-size: var(--bl-text-sm);
    font-weight: 600;
}
.notif-empty .icon { color: var(--bl-success, #2f7d4f); }
.notif-error {
    padding: var(--bl-space-5, 20px);
    text-align: center;
    color: var(--bl-danger);
    font-size: 0.85rem;
}


/* Approvals that still need a decision stay pinned until approved or declined */
.notif-item--pending { border-left: 3px solid var(--bl-accent); cursor: default; }
.notif-pending-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bl-accent-soft);
    color: var(--bl-accent-hover);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
