.hub-order-alerts {
  flex: 0 0 auto;
  color: var(--hub-navy);
}

.hub-order-alerts :is([hidden], label[hidden], button[hidden]) { display: none; }

.hub-order-alerts .hub-order-alert-bell,
.hub-order-alerts .hub-order-alert-close {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--hub-navy);
}

.hub-order-alerts .hub-order-alert-bell:is(:hover, [aria-expanded="true"]),
.hub-order-alerts .hub-order-alert-close:hover {
  border-color: var(--brand-blue);
  background: var(--blue-wash);
  color: var(--link);
}

.hub-order-alert-badge {
  position: absolute;
  z-index: 1;
  top: -7px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 4px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--paper);
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hub-order-alert-panel[open] {
  position: fixed;
  inset: var(--order-alert-top, 70px) var(--order-alert-right, 12px) auto auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(27rem, calc(100vw - 24px));
  max-height: min(37rem, calc(100dvh - var(--order-alert-top, 70px) - 12px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hub-line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--hub-navy);
  box-shadow: 0 14px 40px rgb(15 37 61 / 18%);
}

.hub-order-alert-panel::backdrop { background: rgb(14 36 59 / 24%); }

.hub-order-alerts .hub-order-alert-heading,
.hub-order-alerts .hub-order-alert-controls {
  position: static;
  gap: 6px 12px;
  padding: 10px 14px;
  border-color: var(--hub-line);
}

.hub-order-alert-heading h2,
.hub-order-alert-heading p,
.hub-order-alert-feedback {
  margin: 0;
  overflow-wrap: anywhere;
}

.hub-order-alert-heading h2 {
  font-size: 1.2rem;
  font-weight: 750;
}

.hub-order-alert-heading p,
.hub-order-alert-feedback {
  color: var(--hub-muted);
  font-size: .88rem;
}

.hub-order-alert-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.hub-order-alert-empty {
  margin: 0;
  padding: 20px 14px;
  color: var(--hub-muted);
}

.hub-order-alert-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-order-alert-list li + li { border-top: 1px solid var(--hub-line); }

.hub-order-alert-panel .hub-order-alert-list a {
  display: grid;
  gap: 4px;
  min-height: 55px;
  padding: 9px 14px;
  color: var(--hub-navy);
  text-decoration: none;
}

.hub-order-alert-list a:is(:hover, :focus-visible) { background: var(--blue-wash); }
.hub-order-alert-list a:focus-visible { outline-offset: -3px; }

.hub-order-alert-row-title,
.hub-order-alert-row-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
  overflow-wrap: anywhere;
}

.hub-order-alert-row-title { font-variant-numeric: tabular-nums; }

.hub-order-alert-row-details {
  color: var(--hub-muted);
  font-size: .84rem;
  font-weight: 500;
}

.hub-order-alert-older { margin: 9px 14px; }

.hub-order-alerts .hub-order-alert-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: start;
  background: var(--hub-canvas);
}

.hub-order-alert-controls button { justify-self: start; }

.hub-order-alert-controls label {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding-block: 4px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

.hub-order-alert-controls input { flex: 0 0 auto; }

.hub-order-alert-feedback { grid-column: 1 / -1; }
.hub-order-alert-feedback:empty { display: none; }

.hub-order-alert-toast {
  position: fixed;
  z-index: 10;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(23rem, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid var(--hub-line);
  border-left: 4px solid var(--brand-blue);
  border-radius: 9px;
  background: var(--paper);
  color: var(--hub-navy);
  box-shadow: 0 6px 25px rgb(15 37 61 / 16%);
}

.hub-order-alert-toast div {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.hub-order-alert-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 540px) {
  .hub-order-alert-panel[open] {
    inset: auto 12px max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(37rem, calc(100dvh - 24px));
  }
}
