/**
 * Notifier bell styles. All `--notifier-*` vars resolve to Tabler theme
 * vars first, hardcoded fallbacks only when the theme doesn't expose
 * them. Scoped under .notifier-bell-wrap / .notifier-modal-overlay.
 */

.notifier-bell-wrap,
.notifier-modal-overlay {
    --notifier-primary:       var(--tblr-primary, var(--bs-primary, var(--primary, #0d6efd)));
    --notifier-primary-rgb:   var(--tblr-primary-rgb, var(--bs-primary-rgb, 13, 110, 253));
    /* Derive the pressed shade from the resolved primary; --tblr-primary-darker
       is unreliable across themes. */
    --notifier-primary-dark:  color-mix(in srgb, var(--notifier-primary), #000 14%);
    --notifier-danger:        var(--tblr-danger, #dc3545);
    --notifier-success:       var(--tblr-success, #198754);
    --notifier-warning:       var(--tblr-warning, #fd7e14);
    --notifier-info:          var(--tblr-info, #0dcaf0);
    --notifier-purple:        var(--tblr-purple, #6f42c1);
    --notifier-teal:          var(--tblr-teal, #20c997);
    --notifier-pink:          var(--tblr-pink, #d63384);
    --notifier-surface:       var(--tblr-bg-surface, #fff);
    --notifier-surface-alt:   var(--tblr-bg-surface-secondary, #f8f9fa);
    --notifier-border:        var(--tblr-border-color, rgba(0, 0, 0, .1));
    --notifier-text:          var(--tblr-body-color, #212529);
    /* Derived from the resolved body colour, never from
       --tblr-secondary-color: dark themes routinely set that to a
       near-black that vanishes against their own panel background. */
    --notifier-text-muted:    color-mix(in srgb, var(--notifier-text) 72%, transparent);
    --notifier-row-hover:     var(--tblr-bg-surface-tertiary, #f1f3f5);
}

.notifier-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ====== Floating shell ====== */

.notifier-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    vertical-align: middle;
}

/* Floating mount: GLPI header DOM varies by theme; fixed bottom-right
   sidesteps every selector-based mount edge case. */
.notifier-bell-wrap.notifier-bell-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    z-index: 10050;
    margin-right: 0;
    transition: right .2s ease;
}

.notifier-bell-wrap.notifier-bell-floating .notifier-bell-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--notifier-primary);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(var(--notifier-primary-rgb), .4);
    color: #fff;
    font-size: 22px;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.notifier-bell-wrap.notifier-bell-floating .notifier-bell-btn:hover,
.notifier-bell-wrap.notifier-bell-floating .notifier-bell-btn:focus-visible {
    background: var(--notifier-primary-dark);
    box-shadow: 0 10px 26px rgba(var(--notifier-primary-rgb), .5);
    outline: 0;
    transform: translateY(-1px);
}

.notifier-bell-wrap.notifier-bell-floating .notifier-bell-badge {
    top: 0;
    right: 0;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 11px;
    box-shadow: 0 0 0 2px var(--notifier-surface);
}

.notifier-bell-wrap.notifier-bell-floating.is-collapsed {
    right: -36px;
}

.notifier-bell-wrap.notifier-bell-floating.is-collapsed:hover {
    right: -20px;
}

.notifier-bell-wrap.notifier-bell-floating.is-collapsed .notifier-bell-panel {
    display: none !important;
}

.notifier-bell-restore {
    position: absolute;
    top: -10px;
    left: -14px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--notifier-primary);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(var(--notifier-primary-rgb), .4);
    z-index: 1;
}

.notifier-bell-wrap.notifier-bell-floating.is-collapsed .notifier-bell-restore {
    display: inline-flex;
}

/* Floating panel opens upwards from the button, anchored right-edge so
   it never spills off-screen on narrow viewports. */
.notifier-bell-wrap.notifier-bell-floating .notifier-bell-panel {
    top: auto;
    bottom: calc(100% + 12px);
    right: 0;
    left: auto;
    transform-origin: bottom right;
}

.notifier-bell-btn {
    background: transparent;
    border: 0;
    padding: 6px 10px;
    cursor: pointer;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    border-radius: 8px;
    transition: background-color .15s ease;
    position: relative;
}

.notifier-bell-btn:hover,
.notifier-bell-btn:focus-visible {
    background-color: rgba(0, 0, 0, .08);
    outline: 0;
}

/* Fires once per arriving batch, not on every render — the class is
   removed and re-added by the client to restart the animation. */
.notifier-bell-wrap.has-arrival .notifier-bell-btn {
    animation: notifier-pulse 1.2s ease-in-out 1;
}

@keyframes notifier-pulse {
    0%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(-12deg); }
    20%, 40% { transform: rotate( 12deg); }
    50%      { transform: rotate(0); }
}

.notifier-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 10px;
    background: var(--notifier-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--notifier-surface);
    pointer-events: none;
}

/* ====== Panel ====== */

.notifier-bell-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 440px;
    /* Anchored to the bell at the bottom of the viewport, so the cap has
       to leave room or the panel runs off the top of the screen. */
    max-height: min(640px, calc(100vh - 130px));
    background: var(--notifier-surface);
    border: 1px solid var(--notifier-border);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifier-pop-in .15s ease-out;
}

@keyframes notifier-pop-in {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.notifier-bell-panel[hidden] {
    display: none;
}

.notifier-bell-panel-header {
    background: var(--notifier-surface);
    border-bottom: 1px solid var(--notifier-border);
}

.notifier-bell-panel-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
}

.notifier-bell-panel-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--notifier-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notifier-bell-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background: rgba(var(--notifier-primary-rgb), .12);
    color: var(--notifier-primary);
    font-weight: 700;
    font-size: 11px;
}

.notifier-bell-panel-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notifier-bell-offline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--notifier-warning), transparent 86%);
    color: var(--notifier-warning);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.notifier-bell-offline[hidden] {
    display: none;
}

.notifier-bell-minimize {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--notifier-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.notifier-bell-minimize:hover,
.notifier-bell-minimize:focus-visible {
    background: rgba(0, 0, 0, .08);
    color: var(--notifier-text);
    outline: 0;
}

/* ====== Search ====== */

/* The input is the only bordered element here. An earlier version put a
   border on this wrapper too, and every theme that styles inputs drew a
   second box inside the first — one element cannot nest. */
.notifier-bell-search {
    position: relative;
    margin: 0 16px 10px;
}

.notifier-bell-search > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--notifier-text-muted);
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

/* Themes set input padding with weights this file cannot outrank, and
   losing it puts the placeholder underneath the magnifier. Only these two
   declarations need forcing. */
.notifier-bell-panel .notifier-bell-search .notifier-bell-search-input {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 34px 8px 36px !important;
    text-indent: 0 !important;
    height: auto;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--notifier-border);
    border-radius: 9px;
    outline: 0;
    box-shadow: none;
    background: var(--notifier-surface-alt);
    color: var(--notifier-text);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.notifier-bell-panel .notifier-bell-search .notifier-bell-search-input:focus,
.notifier-bell-panel .notifier-bell-search .notifier-bell-search-input:focus-visible {
    outline: 0;
    border-color: var(--notifier-primary);
    box-shadow: 0 0 0 3px rgba(var(--notifier-primary-rgb), .16);
}

.notifier-bell-search-input::-webkit-search-cancel-button,
.notifier-bell-search-input::-webkit-search-decoration {
    display: none;
    -webkit-appearance: none;
}

.notifier-bell-search-input::placeholder {
    color: var(--notifier-text-muted);
    opacity: 1;
}

.notifier-bell-search-clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--notifier-text-muted);
    cursor: pointer;
    font-size: 11px;
}

.notifier-bell-search-clear:hover {
    background: var(--notifier-row-hover);
    color: var(--notifier-text);
}

.notifier-bell-search-clear[hidden] {
    display: none;
}

/* ====== Tabs ====== */

.notifier-bell-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    border-bottom: 1px solid var(--notifier-border);
    min-height: 40px;
}

.notifier-bell-tab {
    background: transparent;
    border: 0;
    padding: 10px 4px;
    margin-right: 16px;
    color: var(--notifier-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    position: relative;
    transition: color .12s ease;
}

.notifier-bell-tab:hover,
.notifier-bell-tab:focus-visible {
    color: var(--notifier-text);
    outline: 0;
}

.notifier-bell-tab.is-active {
    color: var(--notifier-primary);
}

.notifier-bell-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--notifier-primary);
    border-radius: 2px 2px 0 0;
}

.notifier-bell-markall {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--notifier-primary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notifier-bell-markall:hover,
.notifier-bell-markall:focus-visible {
    background: rgba(var(--notifier-primary-rgb), .08);
    outline: 0;
}

/* ====== List ====== */

.notifier-bell-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--notifier-surface-alt);
}

.notifier-bell-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.notifier-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 12px 12px 14px;
    cursor: pointer;
    transition: background-color .12s ease;
    background: var(--notifier-surface);
}

.notifier-bell-group-main {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
    align-items: flex-start;
    cursor: pointer;
    border-radius: 8px;
}

.notifier-bell-group-main:focus-visible {
    outline: 2px solid var(--notifier-primary);
    outline-offset: 2px;
}

.notifier-bell-item:hover {
    background: var(--notifier-row-hover);
}

/* Unread reads as a state, not a stripe: accent rail, soft tint, and a
   heavier title all pointing the same direction. */
.notifier-bell-item.is-unread {
    background: rgba(var(--notifier-primary-rgb), .07);
    box-shadow: inset 3px 0 0 0 var(--notifier-primary);
}

.notifier-bell-item.is-unread .notifier-bell-item-title {
    font-weight: 700;
    color: var(--notifier-text);
}

.notifier-bell-item.is-unread .notifier-bell-item-msg {
    color: var(--notifier-text);
}

.notifier-bell-item.is-unread:hover {
    background: rgba(var(--notifier-primary-rgb), .12);
}

.notifier-bell-item-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notifier-bell-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--notifier-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notifier-bell-item-msg {
    font-size: 12px;
    color: var(--notifier-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notifier-bell-item-meta {
    font-size: 11px;
    /* No extra opacity here: --notifier-text-muted is already translucent
       and stacking the two fades it out of legibility. */
    color: var(--notifier-text-muted);
    margin-top: 2px;
}

.notifier-bell-item-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

/* ====== Avatar ====== */

.notifier-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    /* Translucent hue over whatever surface the theme provides, with the
       theme's own text colour on top — readable in light and dark alike
       without having to detect which one is active. */
    background: hsl(var(--notifier-avatar-hue, 210) 65% 55% / .22);
    color: var(--notifier-text);
}

.notifier-avatar.is-system {
    background: var(--notifier-surface-alt);
    color: var(--notifier-text-muted);
    font-size: 14px;
    border: 1px solid var(--notifier-border);
}

.notifier-avatar-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #fff;
    background: var(--notifier-text-muted);
    box-shadow: 0 0 0 2px var(--notifier-surface);
}

.notifier-bell-item.is-unread .notifier-avatar-badge {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--notifier-surface), var(--notifier-primary) 7%);
}

/* One palette drives the avatar badge, the sub-row icon and the
   preferences list, so an event looks the same everywhere. */
.notifier-event-badge-assigned       { background: var(--notifier-success); }
.notifier-event-badge-created        { background: var(--notifier-primary); }
.notifier-event-badge-commented      { background: var(--notifier-purple); }
.notifier-event-badge-status_changed { background: var(--notifier-warning); }
.notifier-event-badge-solution       { background: var(--notifier-teal); }
.notifier-event-badge-task_added     { background: var(--notifier-info); color: #000; }
.notifier-event-badge-updated        { background: var(--notifier-text-muted); }
.notifier-event-badge-validation     { background: var(--notifier-warning); }
.notifier-event-badge-mention        { background: var(--notifier-pink); }
.notifier-event-badge-deadline       { background: var(--notifier-danger); }

/* ====== Row buttons ====== */

.notifier-bell-item-toggle,
.notifier-bell-snooze,
.notifier-bell-group-expand {
    flex: 0 0 auto;
    align-self: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background .12s ease, color .12s ease, border-color .12s ease, transform .15s ease;
}

.notifier-bell-item-toggle {
    border: 1px solid rgba(var(--notifier-primary-rgb), .3);
    background: var(--notifier-surface);
    color: var(--notifier-primary);
}

.notifier-bell-item-toggle:hover,
.notifier-bell-item-toggle:focus-visible {
    background: var(--notifier-primary);
    color: #fff;
    border-color: var(--notifier-primary);
    outline: 0;
}

.notifier-bell-item.is-read .notifier-bell-item-toggle,
.notifier-bell-sub-item.is-read .notifier-bell-item-toggle {
    border-color: var(--notifier-border);
    color: var(--notifier-text-muted);
}

.notifier-bell-item.is-read .notifier-bell-item-toggle:hover,
.notifier-bell-sub-item.is-read .notifier-bell-item-toggle:hover {
    border-color: rgba(var(--notifier-primary-rgb), .3);
    color: var(--notifier-primary);
    background: var(--notifier-surface);
}

.notifier-bell-snooze,
.notifier-bell-group-expand {
    border: 0;
    background: transparent;
    color: var(--notifier-text-muted);
}

.notifier-bell-snooze:hover,
.notifier-bell-snooze:focus-visible,
.notifier-bell-group-expand:hover,
.notifier-bell-group-expand:focus-visible {
    background: rgba(var(--notifier-primary-rgb), .1);
    color: var(--notifier-primary);
    outline: 0;
}

.notifier-bell-group.is-expanded .notifier-bell-group-expand {
    color: var(--notifier-primary);
    transform: rotate(180deg);
}

/* ====== Snooze menu ====== */

.notifier-snooze-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 190px;
    padding: 5px;
    background: var(--notifier-surface);
    border: 1px solid var(--notifier-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
    z-index: 10;
    animation: notifier-pop-in .12s ease-out;
}

.notifier-snooze-menu button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--notifier-text);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.notifier-snooze-menu button:hover,
.notifier-snooze-menu button:focus-visible {
    background: rgba(var(--notifier-primary-rgb), .1);
    color: var(--notifier-primary);
    outline: 0;
}

/* ====== Grouped notifications ====== */

.notifier-bell-group {
    list-style: none;
    border-bottom: 1px solid var(--notifier-border);
}

.notifier-bell-group:last-child {
    border-bottom: 0;
}

.notifier-bell-group-meta-count {
    font-weight: 600;
    color: var(--notifier-primary);
    margin-left: 2px;
}

.notifier-bell-drawer {
    background: var(--notifier-surface-alt);
    border-top: 1px solid var(--notifier-border);
}

.notifier-bell-subs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notifier-bell-sub-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px 10px 58px;  /* aligns with the avatar column */
    border-top: 1px solid var(--notifier-border);
    cursor: pointer;
    transition: background-color .12s ease;
    background: transparent;
}

.notifier-bell-sub-item:first-child {
    border-top: 0;
}

.notifier-bell-sub-item:hover {
    background: var(--notifier-row-hover);
}

.notifier-bell-sub-item.is-unread {
    background: rgba(var(--notifier-primary-rgb), .07);
}

.notifier-bell-sub-item.is-unread:hover {
    background: rgba(var(--notifier-primary-rgb), .12);
}

.notifier-bell-sub-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
}

.notifier-bell-sub-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notifier-bell-sub-msg {
    font-size: 12px;
    color: var(--notifier-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notifier-bell-sub-item.is-unread .notifier-bell-sub-msg {
    font-weight: 600;
}

/* ====== Quick actions ====== */

.notifier-qa {
    padding: 12px 16px 12px 58px;
    border-top: 1px solid var(--notifier-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notifier-qa.is-busy {
    opacity: .6;
    pointer-events: none;
}

.notifier-qa-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--notifier-text-muted);
}

.notifier-qa-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifier-qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--notifier-border);
    border-radius: 8px;
    background: var(--notifier-surface);
    color: var(--notifier-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .12s ease, background .12s ease, color .12s ease;
}

.notifier-qa-btn:hover,
.notifier-qa-btn:focus-visible {
    border-color: var(--notifier-primary);
    color: var(--notifier-primary);
    background: rgba(var(--notifier-primary-rgb), .06);
    outline: 0;
}

.notifier-qa-status {
    flex: 1;
    min-width: 0;
}

/* Same reasoning as the search box: out-specify the theme's own control
   styling so these read as one consistent set of fields. */
.notifier-qa .notifier-qa-select,
.notifier-qa .notifier-qa-input {
    width: 100%;
    margin: 0;
    padding: 6px 10px;
    height: auto;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--notifier-border);
    border-radius: 8px;
    box-shadow: none;
    background: var(--notifier-surface);
    color: var(--notifier-text);
    font-size: 12px;
    font-family: inherit;
    line-height: 1.4;
}

.notifier-qa .notifier-qa-select:focus,
.notifier-qa .notifier-qa-input:focus {
    outline: 0;
    border-color: var(--notifier-primary);
    box-shadow: 0 0 0 3px rgba(var(--notifier-primary-rgb), .16);
}

.notifier-qa .notifier-qa-input::placeholder {
    color: var(--notifier-text-muted);
    opacity: 1;
}

.notifier-qa-input {
    flex: 1;
    min-width: 0;
}

.notifier-qa-send {
    background: var(--notifier-primary);
    border-color: var(--notifier-primary);
    color: #fff;
}

.notifier-qa-send:hover,
.notifier-qa-send:focus-visible {
    background: var(--notifier-primary-dark);
    border-color: var(--notifier-primary-dark);
    color: #fff;
}

.notifier-qa-feedback {
    font-size: 12px;
    color: var(--notifier-success);
    font-weight: 600;
}

.notifier-qa-feedback.is-error {
    color: var(--notifier-danger);
}

.notifier-qa-feedback[hidden] {
    display: none;
}

/* ====== Notes ====== */

.notifier-notes {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.notifier-notes[hidden] {
    display: none;
}

.notifier-notes-add {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--notifier-border);
    background: var(--notifier-surface);
}

/* Single bordered element per field, for the same reason as the search
   box: a wrapper border plus a themed input reads as a box in a box. */
.notifier-notes-add .notifier-notes-input,
.notifier-notes-add .notifier-notes-when {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 11px;
    height: auto;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--notifier-border);
    border-radius: 9px;
    outline: 0;
    box-shadow: none;
    background: var(--notifier-surface-alt);
    color: var(--notifier-text);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
}

.notifier-notes-add .notifier-notes-input:focus,
.notifier-notes-add .notifier-notes-when:focus {
    outline: 0;
    border-color: var(--notifier-primary);
    box-shadow: 0 0 0 3px rgba(var(--notifier-primary-rgb), .16);
}

.notifier-notes-input::placeholder {
    color: var(--notifier-text-muted);
    opacity: 1;
}

.notifier-notes-add-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.notifier-notes-add .notifier-notes-when {
    flex: 1 1 150px;
    width: auto;
    min-width: 0;
}

.notifier-notes-quick {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--notifier-border);
    border-radius: 20px;
    background: transparent;
    color: var(--notifier-text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.notifier-notes-quick:hover,
.notifier-notes-quick:focus-visible {
    border-color: var(--notifier-primary);
    color: var(--notifier-primary);
    background: rgba(var(--notifier-primary-rgb), .06);
    outline: 0;
}

.notifier-notes-save {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 7px 16px;
}

.notifier-notes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.notifier-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--notifier-border);
    background: var(--notifier-surface);
}

.notifier-note:last-child {
    border-bottom: 0;
}

.notifier-note.is-overdue {
    background: color-mix(in srgb, var(--notifier-danger), transparent 92%);
    box-shadow: inset 3px 0 0 0 var(--notifier-danger);
}

.notifier-note.is-done {
    background: var(--notifier-surface-alt);
}

.notifier-note-check {
    flex: 0 0 auto;
    margin-top: 1px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1.5px solid var(--notifier-border);
    border-radius: 6px;
    background: transparent;
    color: transparent;
    font-size: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.notifier-note-check:hover,
.notifier-note-check:focus-visible {
    border-color: var(--notifier-primary);
    color: rgba(var(--notifier-primary-rgb), .5);
    outline: 0;
}

.notifier-note.is-done .notifier-note-check {
    background: var(--notifier-success);
    border-color: var(--notifier-success);
    color: #fff;
}

.notifier-note-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notifier-note-text {
    font-size: 13px;
    color: var(--notifier-text);
    overflow-wrap: anywhere;
}

.notifier-note.is-done .notifier-note-text {
    text-decoration: line-through;
    color: var(--notifier-text-muted);
}

.notifier-note-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--notifier-text-muted);
}

.notifier-note-when {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notifier-note.is-overdue .notifier-note-when {
    color: var(--notifier-danger);
    font-weight: 700;
}

.notifier-note-link {
    color: var(--notifier-primary);
    text-decoration: none;
    font-weight: 600;
}

.notifier-note-link:hover {
    text-decoration: underline;
}

.notifier-note-delete {
    flex: 0 0 auto;
    align-self: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--notifier-text-muted);
    cursor: pointer;
    font-size: 11px;
    opacity: 0;
    transition: opacity .12s ease, background .12s ease, color .12s ease;
}

.notifier-note:hover .notifier-note-delete,
.notifier-note-delete:focus-visible {
    opacity: 1;
}

.notifier-note-delete:hover,
.notifier-note-delete:focus-visible {
    background: color-mix(in srgb, var(--notifier-danger), transparent 88%);
    color: var(--notifier-danger);
    outline: 0;
}

.notifier-notes-empty {
    padding: 36px 20px 44px;
    text-align: center;
}

.notifier-notes-empty[hidden] {
    display: none;
}

/* Shown only for overdue tasks, so it is always an alert. */
.notifier-bell-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 16px;
    margin-left: 3px;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--notifier-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.notifier-bell-tab-count[hidden] {
    display: none;
}

.notifier-bell-search[hidden],
.notifier-bell-markall[hidden] {
    display: none;
}

/* ====== Empty / load more ====== */

.notifier-bell-empty {
    padding: 44px 20px 56px;
    text-align: center;
    color: var(--notifier-text-muted);
    font-size: 13px;
}

.notifier-bell-empty[hidden] {
    display: none;
}

.notifier-bell-empty-art {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(var(--notifier-primary-rgb), .12),
        rgba(var(--notifier-primary-rgb), .02));
    color: var(--notifier-primary);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifier-bell-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--notifier-text);
    margin-bottom: 4px;
}

.notifier-bell-empty-hint {
    font-size: 13px;
    color: var(--notifier-text-muted);
}

.notifier-bell-loadmore {
    flex: 0 0 auto;
    margin: 0;
    padding: 11px;
    border: 0;
    border-top: 1px solid var(--notifier-border);
    background: var(--notifier-surface);
    color: var(--notifier-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.notifier-bell-loadmore:hover:not(:disabled),
.notifier-bell-loadmore:focus-visible:not(:disabled) {
    background: rgba(var(--notifier-primary-rgb), .08);
    outline: 0;
}

.notifier-bell-loadmore:disabled {
    color: var(--notifier-text-muted);
    cursor: default;
}

.notifier-bell-loadmore[hidden] {
    display: none;
}

/* ====== Footer ====== */

.notifier-bell-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 14px;
    border-top: 1px solid var(--notifier-border);
    background: var(--notifier-surface);
}

.notifier-bell-settings {
    background: var(--notifier-surface);
    border: 1px solid var(--notifier-border);
    border-radius: 8px;
    color: var(--notifier-text);
    cursor: pointer;
    font-size: 13px;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color .12s ease, background .12s ease, color .12s ease;
}

.notifier-bell-settings i {
    color: var(--notifier-primary);
}

.notifier-bell-settings:hover,
.notifier-bell-settings:focus-visible {
    border-color: var(--notifier-primary);
    background: rgba(var(--notifier-primary-rgb), .06);
    outline: 0;
}

/* ====== Preferences modal ====== */

.notifier-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: notifier-fade-in .15s ease-out;
}

.notifier-modal-overlay[hidden] {
    display: none;
}

@keyframes notifier-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.notifier-modal {
    background: var(--notifier-surface);
    color: var(--notifier-text);
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .35);
    width: 540px;
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifier-pop-in .18s ease-out;
}

.notifier-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--notifier-border);
}

.notifier-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--notifier-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.notifier-modal-title i {
    color: var(--notifier-primary);
}

.notifier-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--notifier-text-muted);
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notifier-modal-close:hover,
.notifier-modal-close:focus-visible {
    background: rgba(0, 0, 0, .08);
    color: var(--notifier-text);
    outline: 0;
}

.notifier-modal-body {
    padding: 18px 22px 8px;
    overflow-y: auto;
    flex: 1;
}

.notifier-modal-intro {
    margin: 0 0 16px;
    color: var(--notifier-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.notifier-pref-heading {
    margin: 22px 0 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--notifier-text-muted);
}

.notifier-pref-heading:first-of-type {
    margin-top: 0;
}

.notifier-pref-sub {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--notifier-text-muted);
}

.notifier-pref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.notifier-pref-table thead th {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--notifier-text-muted);
    padding: 8px 10px;
    border-bottom: 1px solid var(--notifier-border);
}

.notifier-pref-table thead th:first-child {
    text-align: left;
}

.notifier-pref-table tbody th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--notifier-text);
    border-bottom: 1px solid var(--notifier-border);
    width: 50%;
}

.notifier-pref-table tbody td {
    text-align: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--notifier-border);
    vertical-align: middle;
}

.notifier-pref-table tbody tr:last-child th,
.notifier-pref-table tbody tr:last-child td {
    border-bottom: 0;
}

.notifier-pref-events {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notifier-pref-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--notifier-border);
}

.notifier-pref-event:last-child {
    border-bottom: 0;
}

.notifier-pref-event-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    background: var(--notifier-text-muted);
}

.notifier-pref-event-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--notifier-text);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notifier-pref-event-label small {
    font-weight: 400;
    font-size: 11px;
    color: var(--notifier-text-muted);
    line-height: 1.4;
}

.notifier-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    cursor: pointer;
    vertical-align: middle;
}

.notifier-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.notifier-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--notifier-border);
    border-radius: 24px;
    transition: background .15s ease;
}

.notifier-switch-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .15s ease;
}

.notifier-switch input:checked + .notifier-switch-slider {
    background: var(--notifier-primary);
}

.notifier-switch input:checked + .notifier-switch-slider::before {
    transform: translateX(18px);
}

.notifier-switch input:focus-visible + .notifier-switch-slider {
    box-shadow: 0 0 0 3px rgba(var(--notifier-primary-rgb), .25);
}

.notifier-modal-toast,
.notifier-modal-warning {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifier-modal-toast {
    background: rgba(var(--notifier-primary-rgb), .08);
    color: var(--notifier-primary);
}

.notifier-modal-warning {
    background: color-mix(in srgb, var(--notifier-warning), transparent 88%);
    color: var(--notifier-warning);
}

.notifier-modal-toast[hidden],
.notifier-modal-warning[hidden] {
    display: none;
}

.notifier-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--notifier-border);
    background: var(--notifier-surface-alt);
}

.notifier-btn {
    background: transparent;
    border: 1px solid var(--notifier-border);
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--notifier-text);
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.notifier-btn:hover,
.notifier-btn:focus-visible {
    background: var(--notifier-row-hover);
    outline: 0;
}

.notifier-btn-primary {
    background: var(--notifier-primary);
    border-color: var(--notifier-primary);
    color: #fff;
}

.notifier-btn-primary:hover,
.notifier-btn-primary:focus-visible {
    background: var(--notifier-primary-dark);
    border-color: var(--notifier-primary-dark);
    color: #fff;
}

.notifier-btn-primary:disabled,
.notifier-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ====== Admin config page ====== */

.notifier-config-table td,
.notifier-config-table th {
    vertical-align: middle;
}

.notifier-config-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--tblr-secondary-color, #6c757d);
    margin-top: 3px;
    max-width: 60ch;
}

/* ====== Dark theme ====== */

.theme-dark .notifier-bell-btn,
.is-dark-header .notifier-bell-btn {
    color: #fff;
}

.theme-dark .notifier-bell-btn:hover,
.is-dark-header .notifier-bell-btn:hover {
    background: rgba(255, 255, 255, .15);
}

.theme-dark .notifier-bell-minimize:hover,
.theme-dark .notifier-modal-close:hover,
[data-bs-theme="dark"] .notifier-bell-minimize:hover,
[data-bs-theme="dark"] .notifier-modal-close:hover {
    background: rgba(255, 255, 255, .1);
}

/* ====== Responsive ====== */

@media (max-width: 600px) {
    .notifier-bell-wrap.notifier-bell-floating {
        bottom: 14px;
        right: 14px;
    }
    .notifier-bell-wrap.notifier-bell-floating .notifier-bell-panel {
        width: calc(100vw - 28px);
        max-width: 460px;
        max-height: 75vh;
        right: 0;
    }
    .notifier-modal {
        width: 100%;
    }
    .notifier-pref-table tbody th {
        font-size: 13px;
    }
    .notifier-qa,
    .notifier-bell-sub-item {
        padding-left: 16px;
    }
    .notifier-qa-row {
        flex-wrap: wrap;
    }
}

/* ====== Reduced motion ====== */

@media (prefers-reduced-motion: reduce) {
    .notifier-bell-wrap *,
    .notifier-modal-overlay * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .notifier-bell-panel,
    .notifier-modal,
    .notifier-snooze-menu {
        animation: none;
    }

    .notifier-bell-wrap.has-arrival .notifier-bell-btn {
        animation: none;
    }
}
