/* Bell in the header and the notification center dialog (Phase 18). */
.notification-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--ds-border-hairline, rgba(159, 207, 255, 0.18));
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary, #c2d4e5);
  cursor: pointer;
}

.notification-bell.hidden { display: none; }

.notification-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell:hover,
.notification-bell:focus-visible {
  color: var(--gold-bright, #f5c04a);
  border-color: var(--gold-bright, #f5c04a);
}

.notification-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-bright, #f5c04a);
  color: #06152c;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.notification-bell-badge.hidden { display: none; }

.notification-dialog {
  width: min(460px, 94vw);
  max-height: 86dvh;
  padding: 0;
  border: 1px solid var(--ds-border-strong, rgba(91, 173, 255, 0.58));
  border-radius: var(--radius-lg, 18px);
  background: #06152c;
  color: inherit;
}

.notification-dialog::backdrop { background: rgba(2, 8, 18, 0.72); }

.notification-dialog-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 86dvh;
  padding: 18px;
}

.notification-dialog-head,
.notification-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-dialog-head h2 {
  margin: 0;
  min-width: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.notification-dialog-head .icon-button { flex: none; }

.notification-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.notification-item button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--ds-border-hairline, rgba(159, 207, 255, 0.18));
  border-left: 4px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-item.is-unread button {
  border-left-color: var(--gold-bright, #f5c04a);
  background: color-mix(in srgb, var(--gold-bright, #f5c04a) 10%, transparent);
}

.notification-item small { opacity: 0.7; }
.notification-item span { opacity: 0.85; font-size: 0.9rem; }
.notification-empty { padding: 18px 4px; opacity: 0.75; text-align: center; }
.notification-sound-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }

/* Settings panel on the profile page */
.notification-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 14px;
  min-height: 44px;
  cursor: pointer;
}

/* Toggle switches (a checkbox with role="switch"): the whole row is the target, the state is also announced by screen readers. */
body[data-theme="classic"] input.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 0;
  border: 1px solid var(--ds-border-strong, rgba(159, 207, 255, 0.35));
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

body[data-theme="classic"] input.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c2d4e5;
  transition: transform 160ms ease, background 160ms ease;
}

body[data-theme="classic"] input.switch:checked {
  border-color: var(--ui-blue-soft, #63b5ff);
  background: color-mix(in srgb, var(--ui-blue-soft, #63b5ff) 32%, transparent);
}

body[data-theme="classic"] input.switch:checked::after {
  background: var(--ui-blue-soft, #63b5ff);
  transform: translateX(20px);
}

body[data-theme="classic"] input.switch:focus-visible {
  outline: 2px solid var(--ui-blue-soft, #63b5ff);
  outline-offset: 2px;
}

body[data-theme="classic"] input.switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  body[data-theme="classic"] input.switch,
  body[data-theme="classic"] input.switch::after { transition: none; }
}
