#root .cloud-account-shell[data-pg-flex] .pg-workspace-chat-tools:has(> .pg-notifications-toggle) {
  position: relative;
}

#root .cloud-account-shell .pg-notifications-toggle {
  position: relative;
  display: grid;
  flex: 0 0 38px;
  inline-size: 38px;
  block-size: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--pg-theme-line);
  border-radius: var(--pg-ui-radius);
  background: transparent;
  color: var(--pg-theme-text);
}

.cloud-account-shell .pg-notifications-toggle > svg {
  inline-size: 20px;
  block-size: 20px;
}

.cloud-account-shell .pg-notifications-toggle,
.cloud-account-shell .pg-notifications-panel {
  --pg-notifications-unread: #505451;
}

:root[data-pg-theme="night"] .cloud-account-shell :is(.pg-notifications-toggle, .pg-notifications-panel) {
  --pg-notifications-unread: #8D8F8A;
}

.cloud-account-shell :is(.pg-notifications-dot, .pg-notifications-event-marker) {
  inline-size: 7px;
  block-size: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pg-notifications-unread);
}

.cloud-account-shell .pg-notifications-dot {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
}

#root .cloud-account-shell .pg-notifications-panel {
  position: absolute;
  z-index: 24;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  inline-size: min(370px, calc(100vw - max(var(--cloud-gutter), env(safe-area-inset-left)) - max(var(--cloud-gutter), env(safe-area-inset-right))));
  max-block-size: min(465px, calc(100dvh - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  box-sizing: border-box;
  gap: 8px;
  padding: 12px;
  outline: none;
  border: 1px solid var(--pg-theme-line);
  border-radius: var(--pg-ui-radius);
  background: var(--pg-theme-surface);
  color: var(--pg-theme-text);
  box-shadow: var(--pg-elevation-menu);
}

#root .cloud-account-shell :is(.pg-notifications-panel, .pg-notifications-read)[hidden] {
  display: none;
}

.cloud-account-shell .pg-notifications-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.cloud-account-shell .pg-notifications-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

#root .cloud-account-shell .pg-notifications-read {
  min-block-size: 32px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: var(--pg-ui-radius);
  background: transparent;
  color: var(--pg-theme-secondary);
  font-size: 12px;
}

.cloud-account-shell .pg-notifications-list {
  display: grid;
  gap: 5px;
  min-block-size: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.cloud-account-shell .pg-notifications-list:empty {
  display: none;
}

#root .cloud-account-shell .pg-notifications-event {
  display: grid;
  inline-size: 100%;
  justify-items: start;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--pg-theme-line);
  border-radius: var(--pg-ui-radius);
  background: transparent;
  color: var(--pg-theme-text);
  text-align: start;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cloud-account-shell .pg-notifications-event-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cloud-account-shell .pg-notifications-event-title strong {
  font-weight: 500;
}

.cloud-account-shell .pg-notifications-name {
  color: var(--pg-theme-secondary);
}

.cloud-account-shell :is(.pg-notifications-time, .pg-notifications-status) {
  color: var(--pg-theme-muted);
  font-size: 12px;
}

.cloud-account-shell .pg-notifications-status {
  margin: 0;
}

.cloud-account-shell .pg-notifications-status:empty {
  display: none;
}

#root .cloud-account-shell :is(.pg-notifications-toggle, .pg-notifications-read,
  .pg-notifications-event):is(:hover, :focus-visible, [aria-expanded="true"]) {
  border-color: var(--pg-theme-line-strong);
}

@media (max-width: 510px) {
  #root .cloud-account-shell .pg-workspace-chat-tools:has(> .pg-notifications-toggle) {
    gap: 4px;
  }

  #root .cloud-account-shell .pg-workspace-chat-tools:has(> .pg-notifications-toggle)
  > :is(.pg-workspace-chat-toggle, .pg-notifications-toggle) {
    flex-basis: 34px;
    inline-size: 34px;
    block-size: 34px;
  }
}

@media (forced-colors: active) {
  .cloud-account-shell :is(.pg-notifications-dot, .pg-notifications-event-marker) {
    background: Highlight;
    forced-color-adjust: none;
  }
}
