﻿.notif-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: #e11d48;
    color: #fff;
    line-height: 1;
}

#notifBtn {
    position: relative;
}

/* Container directly under the header (right side) */
.notif-panel {
    position: fixed;
    right: 12px;
    top: var(--app-header-h, 55px);
    z-index: 3010;
    width: min(420px, calc(100vw - 24px));
    /* Hidden state: “rollen” vanachter header */
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
}

    /* Open state */
    .notif-panel.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

/* Panel body: echt “kaart” gevoel */
.notif-panel__surface {
    z-index: 2001;
    background: white;
    border-style: none;
    /* Seamless connection to header: geen rounded top */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    overflow: hidden;
    /* Mooie “ligt op pagina” schaduw */
    box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 2px 0 rgba(255,255,255,0.03);
}

    /* Hide microscopic seam under header */
    .notif-panel__surface::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -1px;
        height: 2px;
    }

/* Backdrop */
.notif-backdrop {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--app-header-h, 55px);
    bottom: 0;
    z-index: 3009;
    background: rgba(0, 0, 0, 0.30);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

    .notif-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }
.notif-panel.is-open{
    z-index: 3011;
}
/* Keep your existing inner styles mostly */
.notif-panel__header {
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.notif-panel__title {
    font-weight: 700;
}

.notif-panel__empty {
    z-index: 2001;
    padding: 14px;
    opacity: .8;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
    transition: background-color 140ms ease;
}

.notif-item:not(.is-read) {
    background: #f7f7f7;
}

.notif-item:hover,
.notif-item:focus-visible {
    background: rgba(0,0,0,0.04);
    outline: none;
}

.notif-item__icon {
    opacity: .9;
    padding-top: 2px;
}

.notif-item__body {
    flex: 1;
    min-width: 0;
}

.notif-item__title {
    font-weight: 700;
}

.notif-item__msg {
    opacity: .85;
    margin-top: 2px;
    white-space: normal;
}

.notif-item__meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 8px;
    opacity: .75;
    font-size: .9em;
}

.notif-item__action {
    border: none;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.notif-panel__markall {
    padding: 6px 10px;
}

#notifBtn > svg,
#notifBtn > i,
#notifBtn svg {
    margin: 0;
}
#notifBtn svg {
    transform: translateX(-1.5px);
}

.notif-item.is-read {
    background: #fff;
    opacity: .65;
}

.notif-panel__surface--rel {
    position: relative;
}

.notif-panel {
    overscroll-behavior: contain; /* voorkomt scroll “doorgeven” */
    touch-action: pan-y;
}

.notif-panel__list {
    max-height: calc(70vh - var(--app-header-h) - 60px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
