.webpush-lock {
    overflow: hidden;
}

.webpush-prompt,
.webpush-settings {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.webpush-prompt[hidden],
.webpush-settings[hidden],
.webpush-toast[hidden] {
    display: none;
}

.webpush-prompt__backdrop,
.webpush-settings__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
}

.webpush-prompt__sheet,
.webpush-settings__dialog {
    position: relative;
    z-index: 1;
    width: min(28rem, calc(100vw - 1.5rem));
    margin: 0 0.75rem max(0.75rem, env(safe-area-inset-bottom));
    padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
    border-radius: 1.25rem 1.25rem 0.75rem 0.75rem;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
    color: #0f172a;
    font-family: inherit;
}

.webpush-prompt__icon,
.webpush-settings__close svg,
.webpush-prompt__enable svg {
    display: grid;
    place-items: center;
}

.webpush-prompt__icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.85rem;
    border-radius: 0.85rem;
    background: #fee2e2;
    color: #b91c1c;
}

.webpush-prompt__icon svg,
.webpush-settings__close svg {
    width: 1.2rem;
    height: 1.2rem;
}

.webpush-prompt__title,
.webpush-settings__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.webpush-prompt__copy,
.webpush-settings__status {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.45;
}

.webpush-prompt__actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    margin-top: 1.15rem;
}

.webpush-prompt__enable,
.webpush-prompt__dismiss,
.webpush-settings__close {
    font: inherit;
    cursor: pointer;
}

.webpush-prompt__enable,
.webpush-prompt__dismiss {
    min-height: 2.75rem;
    border-radius: 0.9rem;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.webpush-prompt__enable {
    border: 0;
    background: #0f172a;
    color: #fff;
}

.webpush-prompt__enable:hover:not(:disabled) {
    background: #1e293b;
}

.webpush-prompt__dismiss {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
}

.webpush-prompt__dismiss:hover:not(:disabled) {
    background: #f8fafc;
}

.webpush-prompt__enable:disabled,
.webpush-prompt__dismiss:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.webpush-settings__dialog {
    padding-bottom: 1.25rem;
}

.webpush-settings__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.webpush-settings__close {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border: 0;
    border-radius: 0.7rem;
    background: #f1f5f9;
    color: #475569;
}

.webpush-settings__close:hover {
    background: #e2e8f0;
}

.webpush-settings__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #f8fafc;
}

.notification-center__dialog {
    display: flex;
    flex-direction: column;
    width: min(34rem, calc(100vw - 1.5rem));
    max-height: min(88vh, 46rem);
    overflow: hidden;
}

.notification-center__header {
    flex-shrink: 0;
}

.notification-center__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    flex-shrink: 0;
    margin-top: 1rem;
    padding: 0.25rem;
    border-radius: 0.85rem;
    background: #f1f5f9;
}

.notification-center__tab {
    min-height: 2.5rem;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

.notification-center__tab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.notification-center__panel {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0.85rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-center__panel[hidden] {
    display: none;
}

.notification-center__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2rem;
    margin-bottom: 0.6rem;
}

.notification-center__summary {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.notification-center__mark-all,
.notification-center__load-more,
.notification-center__retry {
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.notification-center__mark-all {
    padding: 0.35rem 0;
    background: transparent;
    color: #b91c1c;
    font-size: 0.75rem;
}

.notification-center__mark-all:disabled {
    color: #94a3b8;
    cursor: default;
}

.notification-center__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.notification-center__item {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
}

.notification-center__item.is-unread {
    border-color: #fecaca;
    background: #fff7f7;
}

.notification-center__item-button {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) 0.5rem;
    align-items: start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    border: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.notification-center__item-button:hover {
    background: rgba(248, 250, 252, 0.8);
}

.notification-center__item-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.notification-center__item-icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.7rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
}

.notification-center__item.is-unread .notification-center__item-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.notification-center__item-copy {
    display: block;
    min-width: 0;
}

.notification-center__item-title,
.notification-center__item-message,
.notification-center__item-time {
    display: block;
}

.notification-center__item-title {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.875rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-center__item-message {
    display: -webkit-box;
    margin-top: 0.2rem;
    overflow: hidden;
    color: #64748b;
    font-size: 0.79rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notification-center__item.is-expanded .notification-center__item-message {
    display: block;
    overflow: visible;
}

.notification-center__item-time {
    margin-top: 0.35rem;
    color: #94a3b8;
    font-size: 0.7rem;
}

.notification-center__item-indicator {
    width: 0.45rem;
    height: 0.45rem;
    margin-top: 0.3rem;
    border-radius: 999px;
    background: transparent;
}

.notification-center__item.is-unread .notification-center__item-indicator {
    background: #dc2626;
}

.notification-center__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 9rem;
    padding: 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.9rem;
    color: #64748b;
    font-size: 0.825rem;
    line-height: 1.45;
    text-align: center;
}

.notification-center__state[hidden] {
    display: none;
}

.notification-center__state.is-error {
    border-color: #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

.notification-center__retry,
.notification-center__load-more {
    min-height: 2.4rem;
    border-radius: 0.75rem;
    padding: 0.55rem 0.85rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.8rem;
}

.notification-center__load-more {
    display: block;
    width: 100%;
    margin-top: 0.65rem;
}

.notification-center__load-more[hidden] {
    display: none;
}

.notification-center__device-note {
    margin: 0.65rem 0 0;
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.4;
}

.notification-center-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    border-radius: 999px;
    padding: 0 0.3rem;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
}

.notification-center-badge[hidden] {
    display: none;
}

.webpush-settings-trigger--volunteer {
    position: relative;
}

.webpush-settings-trigger--volunteer .notification-center-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0 0.2rem;
    border: 2px solid #fff;
    font-size: 0.55rem;
}

.webpush-settings__copy {
    min-width: 0;
}

.webpush-settings__label {
    margin: 0;
    font-size: 0.925rem;
    font-weight: 700;
    color: #0f172a;
}

.webpush-toggle {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.webpush-toggle__input {
    position: absolute;
    inset: 0;
    width: 2.75rem;
    height: 1.6rem;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.webpush-toggle__track {
    position: relative;
    width: 2.75rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 160ms ease;
}

.webpush-toggle__track::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.24rem;
    height: 1.24rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 160ms ease;
}

.webpush-toggle__input:checked + .webpush-toggle__track {
    background: #0f172a;
}

.webpush-toggle__input:checked + .webpush-toggle__track::after {
    transform: translateX(1.15rem);
}

.webpush-toggle__input:disabled {
    cursor: not-allowed;
}

.webpush-toggle__input:disabled + .webpush-toggle__track {
    opacity: 0.55;
}

.webpush-toggle__input:focus-visible + .webpush-toggle__track,
.notification-center__tab:focus-visible,
.notification-center__item-button:focus-visible,
.notification-center__mark-all:focus-visible,
.notification-center__load-more:focus-visible,
.notification-center__retry:focus-visible,
.webpush-prompt__enable:focus-visible,
.webpush-prompt__dismiss:focus-visible,
.webpush-settings__close:focus-visible,
.webpush-prompt__backdrop:focus-visible,
.webpush-settings__backdrop:focus-visible {
    outline: 3px solid #38bdf8;
    outline-offset: 2px;
}

.webpush-toast {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 90;
    max-width: min(22rem, calc(100vw - 2rem));
    border-radius: 0.9rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 0.8rem 0.95rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

button.webpush-settings-trigger {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.notification-center-trigger--header {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #374151;
}

.notification-center-trigger--header:hover {
    background: #f3f4f6;
}

.notification-center-trigger--header:focus-visible {
    outline: 3px solid #38bdf8;
    outline-offset: 2px;
}

.notification-center-trigger--header svg {
    width: 1.5rem;
    height: 1.5rem;
}

.notification-center-trigger--header .notification-center-badge {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    min-width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    padding: 0 0.2rem;
    border: 2px solid #fff;
    font-size: 0.6rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.sidebar .sidebar-item.webpush-settings-trigger,
.sidebar button.webpush-settings-trigger,
.organization-sidebar button.webpush-settings-trigger {
    width: 100%;
    border: 0;
    text-align: left;
}

.sidebar .sidebar-item.webpush-settings-trigger {
    background: transparent;
}

.sidebar .sidebar-item.webpush-settings-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.webpush-settings-trigger--volunteer {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(7, 24, 38, 0.16);
    border-radius: 999px;
    background: transparent;
    color: #101c26;
}

.webpush-settings-trigger--volunteer svg {
    width: 1rem;
    height: 1rem;
}

.webpush-settings-trigger--volunteer:hover {
    border-color: #071826;
    background: #071826;
    color: #fff;
}

.webpush-settings-trigger--volunteer:focus-visible {
    outline: 3px solid #ffbd18;
    outline-offset: 4px;
}

@media (min-width: 640px) {
    .webpush-prompt,
    .webpush-settings {
        align-items: flex-end;
        justify-content: flex-end;
        padding: 0 1.25rem 1.25rem;
    }

    .webpush-prompt__sheet,
    .webpush-settings__dialog {
        width: min(22.5rem, calc(100vw - 2.5rem));
        margin: 0;
        border-radius: 1.25rem;
        padding: 1.25rem;
    }

    .webpush-prompt__actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .webpush-prompt__enable,
    .webpush-prompt__dismiss {
        min-height: 2.5rem;
        padding: 0.6rem 0.95rem;
    }

    .webpush-settings {
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
    }

    .notification-center__dialog {
        width: min(34rem, calc(100vw - 3rem));
    }
}

@media (max-width: 639px) {
    .notification-center__dialog {
        max-height: min(88vh, calc(100dvh - 0.75rem));
    }
}

@media (prefers-reduced-motion: reduce) {
    .webpush-toggle__track,
    .webpush-toggle__track::after {
        transition: none;
    }
}
