/* Header notifications panel (layout/notification-panel.phtml).
 * Requires gpd-tokens.css. Every selector is namespaced.
 *
 * The panel is still a Bootstrap .dropdown-menu so the bell toggles it; these
 * rules replace the menu's own padding, border and width. On mobile the
 * header's .notificationDivMobile rules (gpdt-header.css) outrank the width and
 * position here and keep it in the menu's flow.
 *
 * Admin messages are sanitized HTML (paragraphs, lists, links), so the message
 * block styles its own descendants.
 */

.gpd-notify {
  width: 380px;
  max-width: calc(100vw - var(--gpd-space-5));
  padding: 0;
  border: 1px solid var(--gpd-border-subtle);
  border-radius: var(--gpd-radius-md);
  background: var(--gpd-surface-card);
  box-shadow: var(--gpd-shadow-lg);
  color: var(--gpd-text-body);
  font-family: var(--gpd-font-body);
  font-size: var(--gpd-fs-base);
  line-height: var(--gpd-lh-normal);
  overflow: hidden;
}

/* The panel toggles parts with the hidden attribute (Clear all, the unread
   count, the empty message). Any display rule here would otherwise beat it. */
.gpd-notify [hidden] {
  display: none !important;
}

.gpd-notify__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gpd-space-3);
  padding: var(--gpd-space-3) var(--gpd-space-4);
  border-bottom: 1px solid var(--gpd-border-subtle);
}

.gpd-notify__title {
  display: flex;
  align-items: center;
  gap: var(--gpd-space-2);
  margin: 0;
  color: var(--gpd-text-heading);
  font-size: var(--gpd-fs-md);
  font-weight: var(--gpd-fw-semi);
}

.gpd-notify__count {
  padding: var(--gpd-space-1) var(--gpd-space-2);
  border-radius: var(--gpd-radius-pill);
  background: var(--gpd-blue-50);
  color: var(--gpd-blue-deep);
  font-size: var(--gpd-fs-xs);
  font-weight: var(--gpd-fw-semi);
  line-height: 1;
}

.gpd-notify__list {
  max-height: 420px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.gpd-notify__item {
  display: flex;
  gap: var(--gpd-space-3);
  padding: var(--gpd-space-3) var(--gpd-space-4);
  border-bottom: 1px solid var(--gpd-border-subtle);
  background: var(--gpd-surface-card);
}

.gpd-notify__item:last-child {
  border-bottom: 0;
}

.gpd-notify__item--unread {
  background: var(--gpd-blue-50);
}

.gpd-notify__dot {
  flex: 0 0 auto;
  width: var(--gpd-space-2);
  height: var(--gpd-space-2);
  margin-top: var(--gpd-space-2);
  border-radius: var(--gpd-radius-pill);
  background: transparent;
}

.gpd-notify__item--unread .gpd-notify__dot {
  background: var(--gpd-blue);
}

.gpd-notify__body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gpd-notify__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gpd-notify__text {
  margin: 0;
}

/* The whole sentence opens what was shared. */
.gpd-notify__open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gpd-text-body);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gpd-notify__open:hover {
  color: var(--gpd-navy);
  text-decoration: underline;
}

.gpd-notify__message {
  margin: var(--gpd-space-1) 0 0;
}

.gpd-notify__message p,
.gpd-notify__message ul,
.gpd-notify__message ol {
  margin: 0;
}

.gpd-notify__message p + p,
.gpd-notify__message p + ul,
.gpd-notify__message p + ol {
  margin-top: var(--gpd-space-1);
}

.gpd-notify__message ul,
.gpd-notify__message ol {
  padding-left: var(--gpd-space-5);
}

.gpd-notify__message a {
  color: var(--gpd-blue-deep);
  text-decoration: underline;
}

.gpd-notify__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gpd-space-3);
  margin-top: var(--gpd-space-2);
  /* --gpd-text-muted is 4.46:1 on the unread tint; one step darker passes. */
  color: var(--gpd-gray-600);
  font-size: var(--gpd-fs-xs);
}

.gpd-notify__date {
  margin-right: auto;
}

/* Text buttons, as on the system alert banner. The negative margin gives a
   44px target without making the row taller. */
.gpd-notify__action,
.gpd-notify__clear {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: calc(-1 * var(--gpd-space-3)) 0;
  padding: 0 var(--gpd-space-1);
  border: 0;
  border-radius: var(--gpd-radius-sm);
  background: transparent;
  color: var(--gpd-blue-deep);
  font-family: var(--gpd-font-body);
  font-size: var(--gpd-fs-xs);
  font-weight: var(--gpd-fw-semi);
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gpd-notify__clear {
  font-size: var(--gpd-fs-sm);
}

.gpd-notify__action:hover,
.gpd-notify__clear:hover {
  color: var(--gpd-navy);
  text-decoration: underline;
}

.gpd-notify__delete:hover {
  color: var(--gpd-orange-deep);
}

.gpd-notify__open:focus,
.gpd-notify__action:focus,
.gpd-notify__clear:focus {
  outline: none;
}

.gpd-notify__open:focus-visible,
.gpd-notify__action:focus-visible,
.gpd-notify__clear:focus-visible {
  box-shadow: var(--gpd-shadow-focus);
}

.gpd-notify__empty {
  margin: 0;
  padding: var(--gpd-space-5) var(--gpd-space-4);
  color: var(--gpd-text-muted);
  text-align: center;
}
