.beta-search-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.32);
  z-index: 40;
}

.beta-search-drawer {
  /* Component-owned copies of Search's canonical palette keep this shared
     shelf identical when a host page defines different global tokens. */
  --notice-shelf-amber: #e89b2e;
  --notice-shelf-ink: #111111;
  --notice-shelf-blue-ink: #1b2a4e;
  --notice-shelf-blue-tint: #eef1f8;
  --notice-shelf-blue-border: #c9d2e6;
  --notice-shelf-blue-text: #4a5a82;
  --notice-shelf-line: #e6e4de;
  --notice-shelf-muted: #555555;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, calc(100% - 24px));
  z-index: 41;
  overflow-y: auto;
  padding: 26px;
  background: #ffffff;
  border-left: 1px solid var(--notice-shelf-line);
  color: var(--notice-shelf-ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: -18px 0 48px rgba(17, 17, 17, 0.14);
  transform: translateX(0);
  animation: beta-notice-detail-shelf-enter 180ms ease-out;
}

.beta-search-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.beta-search-drawer .beta-module-label {
  margin: 0 0 12px;
  color: var(--notice-shelf-blue-text);
  font-family: "Schibsted Grotesk", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.beta-search-drawer .beta-search-drawer-title {
  margin: 0 0 6px;
  color: var(--notice-shelf-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.beta-search-drawer [data-beta-search-drawer-summary] {
  margin: 0;
  color: var(--notice-shelf-muted);
  font-size: 14px;
  line-height: 1.45;
}

.beta-search-drawer .beta-search-drawer-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--notice-shelf-blue-border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--notice-shelf-blue-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.beta-search-drawer .beta-search-drawer-close:hover,
.beta-search-drawer .beta-search-drawer-close:focus-visible {
  background: var(--notice-shelf-blue-tint);
}

.beta-search-drawer .beta-search-drawer-close:focus-visible {
  outline: 2px solid var(--notice-shelf-amber);
  outline-offset: 2px;
}

.beta-search-drawer-fields {
  display: grid;
  /* minmax(0,…) so a nowrap value can shrink instead of widening the
     drawer past the viewport. */
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0 0 16px;
}

.beta-search-drawer .beta-search-drawer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--notice-shelf-line);
  font-size: 14px;
  line-height: 1.45;
}

.beta-search-drawer .beta-search-drawer-row dt {
  margin: 0;
  color: var(--notice-shelf-blue-text);
  font-family: "Schibsted Grotesk", monospace;
  font-size: 11px;
  line-height: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.beta-search-drawer .beta-search-drawer-row dd {
  margin: 0;
  color: var(--notice-shelf-ink);
  line-height: inherit;
  text-align: right;
}

.beta-search-drawer .beta-search-source-link {
  color: var(--notice-shelf-blue-ink);
  font-weight: 600;
  border-bottom: 1px solid var(--notice-shelf-blue-border);
  white-space: nowrap;
}

.beta-search-drawer .beta-search-source-link:hover {
  border-bottom-color: var(--notice-shelf-blue-ink);
}

.beta-search-drawer .beta-search-drawer-date {
  margin: 0 0 4px;
  color: var(--notice-shelf-blue-text);
  font-size: 13px;
  font-weight: 600;
}

/* The primary action sits beside the notice name, above the fold. It was
   below the field list, where a long record pushed it out of sight. */
.beta-search-drawer-head-main {
  min-width: 0;
}

.beta-search-drawer-head-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.beta-search-drawer-action {
  margin: 0;
}

.beta-search-drawer-action .beta-demand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--notice-shelf-ink);
  border-radius: 6px;
  background: var(--notice-shelf-ink);
  color: #fafaf7;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.beta-search-drawer-action .beta-demand-button:hover,
.beta-search-drawer-action .beta-demand-button:focus-visible {
  transform: translateY(-1px);
  background: var(--notice-shelf-blue-ink);
  border-color: var(--notice-shelf-blue-ink);
}

.beta-search-drawer-action .beta-demand-button:focus-visible {
  outline: 2px solid var(--notice-shelf-amber);
  outline-offset: 2px;
}

.beta-search-drawer-action .beta-demand-button-secondary {
  border-color: var(--notice-shelf-blue-border);
  background: #ffffff;
  color: var(--notice-shelf-blue-ink);
}

.beta-search-drawer-action .beta-demand-button-secondary:hover,
.beta-search-drawer-action .beta-demand-button-secondary:focus-visible {
  background: var(--notice-shelf-blue-tint);
  color: var(--notice-shelf-blue-ink);
}

.beta-search-drawer-action .beta-demand-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.beta-search-drawer-status {
  max-width: 200px;
  text-align: right;
}

.beta-search-drawer-status:empty {
  display: none;
}

.beta-search-relief {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.beta-search-relief-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beta-search-drawer .beta-search-relief-toggle {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--notice-shelf-blue-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.beta-search-drawer .beta-search-relief-toggle:focus-visible {
  outline: 2px solid var(--notice-shelf-amber);
  outline-offset: 2px;
}

/* Dollars first, the agreement directly beneath them. Collapsed the block
   stays right-aligned with the rest of the record; expanded it turns into a
   left-reading paragraph. */
.beta-search-drawer-row.is-settlement dd {
  min-width: 0;
}

.beta-search-settlement-headline {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
}

.beta-search-drawer .beta-search-settlement-note {
  display: block;
  margin-top: 4px;
  color: var(--notice-shelf-muted);
  font-size: 13px;
  line-height: 1.45;
}

.beta-search-settlement-agreement {
  display: block;
  margin-top: 6px;
  white-space: normal;
}

.beta-search-drawer-row.is-settlement.is-block .beta-search-settlement-headline {
  justify-content: flex-start;
}

.beta-search-drawer-row.is-relief dd {
  min-width: 0;
  flex: 1 1 auto;
}

.beta-search-drawer-row.is-relief .beta-search-relief-line {
  flex: 0 1 auto;
  min-width: 0;
}

.beta-search-drawer-row.is-relief.is-block .beta-search-relief {
  display: block;
}

.beta-search-drawer-row.is-relief.is-block .beta-search-relief-toggle {
  margin-top: 6px;
  display: block;
}

.beta-search-drawer .beta-search-entity-link {
  color: var(--notice-shelf-ink);
  border-bottom: 1px solid var(--notice-shelf-blue-border);
}

.beta-search-drawer .beta-search-entity-link:hover {
  color: var(--notice-shelf-blue-ink);
  border-bottom-color: var(--notice-shelf-blue-ink);
}

/* Long-form values (injunctive relief, coverage notes) stack under their
   label and read left to right; right-aligned paragraphs do not. */
.beta-search-drawer-row.is-block {
  display: block;
}

.beta-search-drawer-row.is-block dd {
  margin-top: 6px;
  text-align: left;
  line-height: 1.5;
}

.beta-search-drawer-row.is-block .beta-search-source-link {
  white-space: normal;
}

.beta-search-drawer[hidden],
.beta-search-drawer-backdrop[hidden] {
  display: none !important;
}

@keyframes beta-notice-detail-shelf-enter {
  from {
    transform: translateX(1.25rem);
    opacity: 0.7;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beta-search-drawer {
    animation: none;
  }

  .beta-search-drawer,
  .beta-search-drawer *,
  .beta-search-drawer *::before,
  .beta-search-drawer *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* This shelf renders the Settlement terms card, so the card's report-page grid lives here.
   Two columns, so the money lines stop running down one narrow rail. Keyed on data-term
   rather than position, because a matter may carry several dated agreements, an Other
   payments line, or several PDF links. */
.notice-shell #notice-section-settlement-terms [data-report-metric="settlement-terms"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 7px;
  align-items: baseline;
}

.notice-shell #notice-section-settlement-terms [data-report-metric="settlement-terms"] > .card-line {
  margin: 0;
}

.notice-shell #notice-section-settlement-terms [data-term="relief"] {
  grid-column: 1 / -1;
  padding: 9px 0;
  border-top: 1px solid var(--ns-line);
  border-bottom: 1px solid var(--ns-line);
}

.notice-shell #notice-section-settlement-terms [data-term="relief"] + [data-term="relief"] {
  padding-top: 0;
  border-top: 0;
}

.notice-shell #notice-section-settlement-terms [data-term="relief"]:has(+ [data-term="relief"]) {
  padding-bottom: 0;
  border-bottom: 0;
}

.notice-shell #notice-section-settlement-terms [data-term="note"] {
  color: var(--ns-muted);
}

@media (max-width: 640px) {
  .notice-shell #notice-section-settlement-terms [data-report-metric="settlement-terms"] {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }
}
