/* Shared PromKontur notification panel geometry and internal scrolling. */
.global-notifications-dialog {
  position: fixed;
  inset: 58px 18px auto auto;
  width: min(520px, calc(100vw - 36px));
  height: min(640px, calc(100dvh - 76px));
  max-height: calc(100dvh - 76px);
  margin: 0;
}

.global-notifications-dialog > .global-notifications-close {
  position: absolute;
  z-index: 4;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.global-notifications-dialog > .global-notifications-close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

html:has(.notification-shell),
body:has(.notification-shell) {
  height: 100%;
  min-height: 0;
}

body:has(.notification-shell) {
  overflow: hidden;
}

.notification-shell {
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.notification-shell > header > div:first-child {
  min-width: 0;
}

.header-actions {
  flex: 0 0 auto;
  align-items: center;
}

.feed,
.preferences {
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  align-content: start;
}

@media (max-width: 620px) {
  .global-notifications-dialog {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
  }
}

@media (max-width: 380px) {
  .notification-shell > header {
    align-items: flex-start;
  }

  .header-actions {
    gap: 4px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }
}
