.nwc-app .nwc-thread-notifications-dialog {
    box-sizing: border-box;
    inline-size: min(calc(100% - 1.5rem), 28rem);
    max-inline-size: none;
    max-block-size: calc(100% - 1.5rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #715167;
    border-radius: 1.05rem;
    color: #fff3fa;
    background: #2a2029;
    color-scheme: dark;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.nwc-app .nwc-thread-notifications-dialog:not([open]) { display: none; }
.nwc-app .nwc-thread-notifications-dialog::backdrop { background: #100c12bb; }

.nwc-app .nwc-thread-notifications-dialog[data-fallback][open] {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: 100%;
    max-block-size: none;
    padding: .75rem;
    border: 0;
    border-radius: 0;
    background: #100c12d9;
}

.nwc-app .nwc-thread-notifications-panel,
.nwc-app .nwc-thread-notifications-form {
    display: grid;
    gap: .65rem;
    min-inline-size: 0;
}

.nwc-app .nwc-thread-notifications-panel {
    box-sizing: border-box;
    padding: clamp(.85rem, 3.6vw, 1.25rem);
}

.nwc-app .nwc-thread-notifications-dialog[data-fallback] .nwc-thread-notifications-panel {
    inline-size: min(100%, 28rem);
    max-block-size: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #715167;
    border-radius: 1.05rem;
    background: #2a2029;
}

.nwc-app .nwc-thread-notifications-title {
    margin: 0;
    font-size: 1.13rem;
    font-weight: 700;
    line-height: 1.3;
}

.nwc-app .nwc-thread-notifications-privacy,
.nwc-app .nwc-thread-notifications-general,
.nwc-app .nwc-thread-notifications-expiry,
.nwc-app .nwc-thread-notifications-status {
    margin: 0;
    color: #e9d0df;
    font-size: .83rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nwc-app .nwc-thread-notifications-choices {
    display: grid;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.nwc-app .nwc-thread-notifications-legend {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.nwc-app .nwc-thread-notifications-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    column-gap: .58rem;
    min-block-size: 44px;
    padding: .49rem .6rem;
    border: 1px solid #65485d;
    border-radius: .66rem;
    background: #312530;
    cursor: pointer;
}

.nwc-app .nwc-thread-notifications-option[data-selected="true"] {
    border-color: #cd86ab;
    background: #4b2f44;
}

.nwc-app .nwc-thread-notifications-option + .nwc-thread-notifications-option { margin-block-start: .4rem; }

.nwc-app .nwc-thread-notifications-mode {
    inline-size: 16px;
    block-size: 16px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: #ec98c2;
    cursor: inherit;
}

.nwc-app .nwc-thread-notifications-option-copy { min-inline-size: 0; }
.nwc-app .nwc-thread-notifications-option-title,
.nwc-app .nwc-thread-notifications-option-help { display: block; }

.nwc-app .nwc-thread-notifications-option-title {
    font-size: .9rem;
    font-weight: 650;
    line-height: 1.3;
}

.nwc-app .nwc-thread-notifications-option-help {
    margin-block-start: .13rem;
    color: #e9d0df;
    font-size: .79rem;
    line-height: 1.3;
}

.nwc-app .nwc-thread-notifications-duration-row { display: grid; gap: .32rem; }
.nwc-app .nwc-thread-notifications-duration-label { font-size: .86rem; font-weight: 650; }

.nwc-app .nwc-thread-notifications-duration {
    box-sizing: border-box;
    inline-size: 100%;
    min-block-size: 44px;
    padding: .4rem .63rem;
    border: 1px solid #78506b;
    border-radius: .65rem;
    color: #fff3fa;
    background: #372733;
    font: inherit;
    font-size: .86rem;
}

.nwc-app .nwc-thread-notifications-status:empty { position: absolute; }
.nwc-app .nwc-thread-notifications-status[data-error] { color: #ffc3d6; }

.nwc-app .nwc-thread-notifications-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }

.nwc-app .nwc-thread-notifications-actions button {
    min-block-size: 44px;
    padding: .48rem .68rem;
    border: 1px solid #78506b;
    border-radius: .65rem;
    color: #fff4fa;
    background: #503248;
    font: 650 .86rem/1.2 system-ui, sans-serif;
}

.nwc-app .nwc-thread-notifications-actions .nwc-thread-notifications-submit {
    margin-inline-start: .48rem;
    background: #833358;
}

.nwc-app .nwc-thread-notifications-actions button:not(:disabled):hover { filter: brightness(1.16); }
.nwc-app .nwc-thread-notifications-actions button:disabled { opacity: .56; }
.nwc-app .nwc-thread-notifications-option:focus-within,
.nwc-app .nwc-thread-notifications-duration:focus,
.nwc-app .nwc-thread-notifications-actions button:focus {
    outline: 2px solid #ffc4e0;
    outline-offset: 2px;
}

.nwc-app .nwc-thread-notifications-dialog [hidden] { display: none; }
