/* ===========================================================================
   Notifications — navbar bell + dropdown panel with an ON/OFF alerts switch.
   =========================================================================== */

/* bell (borderless, like the Datebook trigger) */
.nt-bell {
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: none; border-radius: 11px; cursor: pointer; color: #6b7280;
}
.nt-bell:hover { background: #f5f6f8; }
.nt-bell .material-symbols-rounded { font-size: 28px; }

/* The navbar is its own (sticky, z-index:10) stacking layer; lift it above the page while open. */
.app-navbar:has(.nt-panel) { z-index: 3000; }

.nt-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(35, 38, 50, .42);
    animation: nt-fade .16s ease-out;
}
@keyframes nt-fade { from { opacity: 0; } to { opacity: 1; } }

/* panel: pinned top-right, just under the navbar */
.nt-panel {
    position: fixed; top: 52px; right: 24px; z-index: 3001;
    width: min(480px, calc(100vw - 32px));
    background: #f4f4f5; border-radius: 16px;
    box-shadow: 0 14px 40px rgba(20, 20, 40, .28);
    animation: nt-pop .18s ease-out;
}
@keyframes nt-pop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.nt-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 12px; }
.nt-head__text { flex: 1; min-width: 0; }
.nt-head__text h2 { margin: 0; font-size: 1.45rem; font-weight: 400; color: #5b6270; line-height: 1.15; }
.nt-head__sub { font-size: .8rem; color: #8a8f99; margin-top: 2px; }

.nt-close {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: none; border-radius: 8px; cursor: pointer; color: #5b6270; flex: none;
}
.nt-close:hover { background: rgba(0, 0, 0, .06); }
.nt-close .material-symbols-rounded { font-size: 26px; }

/* ON / OFF switch */
.nt-switch {
    position: relative; flex: none; width: 58px; height: 30px; padding: 0;
    border: 0; border-radius: 999px; cursor: pointer; background: #b9bec8;
    transition: background .18s ease;
}
.nt-switch.is-on { background: #4caf50; }
.nt-switch__label {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: .66rem; font-weight: 800; letter-spacing: .03em; color: #fff;
    right: 9px;
}
.nt-switch.is-on .nt-switch__label { right: auto; left: 10px; }
.nt-switch__knob {
    position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .18s ease;
}
.nt-switch.is-on .nt-switch__knob { transform: translateX(28px); }
.nt-switch:focus-visible { outline: 3px solid rgba(76, 175, 80, .35); outline-offset: 2px; }

/* body */
.nt-body { min-height: 130px; padding: 4px 18px 18px; display: flex; flex-direction: column; justify-content: center; }
.nt-empty { text-align: center; font-size: 1.05rem; color: #5b6270; padding: 22px 0 28px; }
.nt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.nt-item { background: #fff; border-radius: 12px; padding: 11px 14px; cursor: pointer; border-left: 4px solid transparent; }
.nt-item:hover { background: #fbf6f8; }
.nt-item.is-unread { border-left-color: #7a1f3d; background: #fdf3f6; }
.nt-item.is-unread .nt-item__title { font-weight: 700; }
.nt-bell { position: relative; }
.nt-badge { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d64545; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
.nt-markall { flex: none; border: 0; background: none; color: #7a1f3d; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: underline; }
.nt-clearread { flex: none; border: 0; background: none; color: #6b7280; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: underline; margin-left: 8px; }
.nt-item__title { font-size: .94rem; font-weight: 600; color: #2b2f36; }
.nt-item__meta { font-size: .76rem; color: #8a8f99; margin-top: 3px; }
