.mh-dialog--notifications {
  --mh-dialog-width: 408px;
  --mh-dialog-header-height: calc(54px * var(--mh-ui-scale));
  --mh-dialog-padding: clamp(20px, 5vw, 24px);
  inset-block-start: calc(var(--mh-header-height) + 5px);
  inset-block-end: auto;
  inset-inline: auto clamp(14px, var(--mh-notification-end, var(--mh-content-gutter)), max(14px, 100vw - var(--mh-dialog-width) - 14px));
  margin: 0;
}
.mh-dialog--notifications::backdrop { background: #08070c28; backdrop-filter: none; }
.mh-dialog--notifications .mh-dialog__surface { overflow: hidden; }
.mh-dialog--notifications .mh-dialog__body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  flex: 1;
  min-height: 0;
  gap: 0;
  padding: 0;
}
.mh-notifications__tabs, .mh-notifications__scroll { margin-inline: var(--mh-dialog-padding); }
.mh-notifications__scroll { height: min(344px, calc(100dvh - var(--mh-header-height) - 156px)); overflow: auto; overscroll-behavior: contain; }
.mh-notifications__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding-inline: 12px;
  transition: background-color 140ms;
}
.mh-notifications__row + .mh-notifications__row::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--mh-divider);
  pointer-events: none;
  content: "";
}
.mh-notifications__row:has(> .mh-notifications__entry:focus-visible) { background-color: var(--mh-select-surface); }
@media (hover: hover) {
  .mh-notifications__row:hover { background-color: var(--mh-select-surface); }
}
.mh-notifications__entry {
  min-width: 0;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 16px 0;
  text-align: start;
  white-space: normal;
}
.mh-notifications__entry:is(:hover, :focus-visible) { background-color: transparent; }
.mh-notifications__icon {
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mh-accent-soft);
  color: var(--mh-accent-bright);
  --mh-icon-size: calc(15px * var(--mh-ui-scale));
}
.mh-notifications__unread { position: absolute; inset: 0 0 auto auto; width: 7px; aspect-ratio: 1; border-radius: 50%; background: var(--mh-accent); box-shadow: 0 0 0 2px var(--mh-dialog-surface); }
.mh-notifications__copy { display: grid; flex: 1; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.mh-notifications__title { color: var(--mh-text); font-size: calc(13px * var(--mh-ui-scale)); line-height: 1.55; }
.mh-notifications__date { color: var(--mh-text-subtle); font-size: calc(11px * var(--mh-ui-scale)); line-height: 1.4; }
.mh-notifications__remove { --mh-icon-button-size: calc(28px * var(--mh-ui-scale)); --mh-icon-size: calc(14px * var(--mh-ui-scale)); margin-block-start: 12px; }
.mh-notifications__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--mh-divider); }
.mh-notifications__meta time { color: var(--mh-text-muted); font-size: calc(12px * var(--mh-ui-scale)); }
.mh-notifications__detail > h3 { margin-block-start: 18px; font-size: calc(15px * var(--mh-ui-scale)); font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.mh-notifications__detail > p { padding-block: 10px 18px; color: var(--mh-text-muted); font-size: calc(13px * var(--mh-ui-scale)); white-space: pre-wrap; }
.mh-notifications__detail > .mh-button { inline-size: 100%; }
.mh-notifications__empty { padding-block: 40px; text-align: center; }
.mh-notifications__scroll > button { display: flex; margin: 7px auto; }
.mh-notifications__status { padding: 6px var(--mh-dialog-padding); }
.mh-notifications__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px var(--mh-dialog-padding);
  --mh-control-height: calc(32px * var(--mh-ui-scale));
  --mh-control-size: calc(12px * var(--mh-ui-scale));
}
@media (max-width: 650px), (hover: none) and (max-width: 960px) {
  .mh-dialog--notifications { width: 100%; height: 100dvh; max-width: none; max-height: none; inset: 0; border-radius: 0; }
  .mh-dialog--notifications .mh-dialog__surface { height: 100%; max-height: none; }
  .mh-notifications__scroll { height: auto; min-height: 0; }
  .mh-notifications__footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
