.sg-notification-settings { position: relative; flex: 0 0 auto; }
.sg-notification-trigger {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; color: var(--ink-400); cursor: pointer;
    border-radius: 5px; list-style: none;
}
.sg-notification-trigger::-webkit-details-marker { display: none; }
.sg-notification-trigger:hover, .sg-notification-settings[open] .sg-notification-trigger {
    color: var(--surface); background: var(--ink-800);
}
.sg-notification-trigger:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.sg-notification-panel {
    position: absolute; z-index: 120; top: calc(100% + 9px); right: 0;
    width: 264px; padding: 16px; border: 1px solid var(--sg-border);
    border-radius: 10px; background: var(--sg-surface); color: var(--sg-text);
    box-shadow: 0 8px 28px rgb(0 0 0 / 16%); font-size: 13px; line-height: 1.4;
}
.sg-notification-panel > strong { font-size: 13px; font-weight: 600; }
.sg-notification-scope { margin: 5px 0 8px; color: var(--sg-text-faint); font-size: 12px; }
.sg-notification-option { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; cursor: pointer; }
.sg-notification-option input {
    appearance: none; width: 28px; height: 16px; margin: 0; border-radius: 10px;
    border: 0; background: var(--sg-border-strong); cursor: pointer; position: relative;
}
.sg-notification-option input::after {
    content: ''; position: absolute; width: 12px; height: 12px; top: 2px; left: 2px;
    border-radius: 50%; background: #fff; transition: transform .12s ease;
}
.sg-notification-option input:checked { background: var(--cobalt); }
.sg-notification-option input:checked::after { transform: translateX(12px); }
.sg-notification-option input:disabled { opacity: .45; cursor: wait; }
.sg-notification-option input:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.sg-notification-status { display: block; min-height: 16px; margin-top: 8px; color: var(--sg-text-faint); font-size: 11px; }
@media (max-width: 600px) {
    .sg-notification-panel { position: fixed; top: 54px; right: 12px; max-width: calc(100vw - 24px); }
}
/* Override the legacy dark-mode input background rule for these switches. */
html.theme-dark .sg-notification-option input { background-color: var(--sg-border-strong) !important; }
html.theme-dark .sg-notification-option input:checked { background-color: var(--cobalt) !important; }
