/* Header notifications: neutral controls, red unread counts, dark sheets. */
#site-header .epe-header-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    background: #202020;
    box-shadow: none;
    color: #d6d2d0;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

#site-header .epe-header-button[hidden],
.epe-notifications [hidden] { display: none !important; }

#site-header .epe-header-button::before {
    content: "";
    position: absolute;
    inset: -2px;
}

#site-header .epe-header-button:hover,
#site-header .epe-header-button[aria-expanded="true"] {
    background: #292727;
    border-color: rgba(255, 255, 255, 0.25);
}

#site-header .epe-header-button svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#site-header .epe-header-button__badge {
    position: absolute;
    top: 3px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 14px;
    min-width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    box-sizing: border-box;
    background: #b91b34;
    box-shadow: 0 0 0 1px #202020;
    color: #fff;
    font: 650 9px/14px var(--xc-font, 'Manrope', sans-serif);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    pointer-events: none;
}

#site-header .epe-header-button__badge[data-wide="true"] { width: 18px; }

#site-header .epe-header-button:hover .epe-header-button__badge,
#site-header .epe-header-button[aria-expanded="true"] .epe-header-button__badge {
    box-shadow: 0 0 0 1px #292727;
}

body.epe-notifications-open { overflow: hidden; }

.epe-notifications {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    color: #eeeae8;
    font-family: var(--xc-font, 'Manrope', 'Inter', sans-serif);
    font-size: 14px;
    line-height: 1.4;
}

.epe-notifications *, .epe-notifications *::before, .epe-notifications *::after {
    box-sizing: border-box;
}

.epe-notifications__backdrop {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: none;
    cursor: default;
    animation: epe-notifications-fade 180ms ease both;
}

.epe-notifications__panel {
    position: absolute;
    top: var(--epe-header-bottom, 88px);
    right: max(20px, env(safe-area-inset-right));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(360px, calc(100vw - 32px));
    max-height: min(560px, calc(100dvh - var(--epe-header-bottom, 88px) - 24px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: #151515;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    animation: epe-notifications-rise 180ms ease both;
}

.epe-notifications__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 80px;
    padding: 18px 20px 14px;
}

.epe-notifications__header h2 {
    margin: 0;
    color: inherit;
    font: 750 18px/1.3 var(--xc-font, 'Manrope', sans-serif);
    letter-spacing: -0.025em;
}

.epe-notifications__heading { min-width: 0; }
.epe-notifications__subtitle {
    margin: 4px 0 0;
    color: #a7a3a2;
    font: 500 12px/1.4 var(--xc-font, 'Manrope', sans-serif);
}

.epe-notifications__close {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: none;
    color: #aaa5a3;
    cursor: pointer;
}

.epe-notifications__close:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.epe-notifications__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.epe-notifications__list {
    min-height: 80px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: #474141 transparent;
}

.epe-notifications__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #eeeae8;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.epe-notifications__item + .epe-notifications__item::before {
    content: "";
    position: absolute;
    top: 0;
    right: 8px;
    left: 68px;
    height: 1px;
    background: rgba(255, 255, 255, 0.055);
}
@media (hover: hover) { a.epe-notifications__item:hover { background: rgba(255, 255, 255, 0.035); } }
a.epe-notifications__item:active { background: rgba(255, 255, 255, 0.06); }
.epe-notifications__avatar {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 8px;
    background: #302426;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.epe-notifications__initial { color: #d5b6bd; font: 600 18px/1 var(--xc-font, 'Manrope', sans-serif); text-transform: uppercase; }
.epe-notifications__image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.epe-notifications__copy { flex: 1; min-width: 0; }
.epe-notifications__label { color: #eeeae8; font-weight: 650; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.epe-notifications__detail { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin-top: 4px; color: #aaa5a3; font-size: 12px; line-height: 1.5; }
.epe-notifications__arrow { width: 6px; height: 6px; flex: none; margin-right: 3px; border-top: 1.5px solid #77706e; border-right: 1.5px solid #77706e; transform: rotate(45deg); }
.epe-notifications__message { margin: 0; padding: 28px 8px; color: #aaa5a3; font: inherit; }

.epe-notifications__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 12px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.epe-notifications__preference { display: flex; align-items: center; gap: 8px; color: #a7a3a2; font-size: 12px; }
.epe-notifications__preference svg { flex: none; width: 16px; height: 16px; }

.epe-notifications__action, .epe-notifications__retry {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    color: #cec5c2;
    font: 600 13px/1.4 var(--xc-font, 'Manrope', sans-serif);
    cursor: pointer;
}

.epe-notifications__action:hover, .epe-notifications__retry:hover { color: #fff; }
.epe-notifications__action:disabled { opacity: 0.6; cursor: wait; }
.epe-notifications__status { flex-basis: 100%; margin: 6px 0; color: #aaa5a3; font: 500 12px/1.5 var(--xc-font, 'Manrope', sans-serif); }

#site-header .epe-header-button:focus-visible,
.epe-notifications :is(a, button):focus-visible { outline: 2px solid #d9cbc7; outline-offset: 3px; }

@media (max-width: 640px) {
    .epe-notifications__panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: min(76dvh, 640px);
        padding-top: 12px;
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
    }
    .epe-notifications__panel::before { content: ""; position: absolute; top: 8px; left: calc(50% - 16px); width: 32px; height: 3px; border-radius: 2px; background: #45403e; }
    .epe-notifications__header { min-height: 80px; padding-top: 16px; padding-bottom: 16px; }
    .epe-notifications__footer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

@keyframes epe-notifications-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes epe-notifications-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .epe-notifications__panel, .epe-notifications__backdrop { animation: none; } #site-header .epe-header-button, .epe-notifications__item { transition: none; } }
