/* banner_html, root .tr-banner.
   Each rule is scoped :where(.tr-banner), which adds no specificity. Rules whose first compound
   is the root itself stay bare; the two data-attribute rules sit on the root, so the
   :where() attaches to their attribute with no space. */
.tr-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--ch-space-md);
  padding: 12px 16px;
  border-radius: var(--ch-radius-md);
  font-family: var(--ch-font-primary);
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}
:where(.tr-banner) .tr-banner-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  font-style: normal;
}
:where(.tr-banner) .tr-banner-body {
  flex: 1;
  min-width: 0;
}
:where(.tr-banner) .tr-banner-title {
  font-weight: 600;
  margin-bottom: 2px;
}
:where(.tr-banner) .tr-banner-message {
  color: inherit;
}
:where(.tr-banner) .tr-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
:where(.tr-banner) .tr-banner-cta {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ch-font-primary);
  background: transparent;
  color: inherit;
  border: 1.5px solid currentColor;
  border-radius: var(--ch-radius-sm);
  cursor: pointer;
  min-height: 32px;
  transition: background var(--ch-transition-fast);
}
:where(.tr-banner) .tr-banner-cta:hover {
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] :where(.tr-banner) .tr-banner-cta:hover {
  background: rgba(255, 255, 255, 0.08);
}
:where(.tr-banner) .tr-banner-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
:where(.tr-banner) .tr-banner-dismiss {
  background: transparent;
  color: inherit;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity var(--ch-transition-fast);
}
:where(.tr-banner) .tr-banner-dismiss:hover {
  opacity: 1;
}

/* Variant — informational (new test) */
.tr-banner.tr-banner-info {
  background: var(--ch-info-bg);
  color: var(--ch-info);
  border-color: var(--ch-info-border);
}

/* Variant — warning (expiring) */
.tr-banner.tr-banner-warning {
  background: var(--ch-warning-bg);
  color: var(--ch-warning);
  border-color: var(--ch-warning-border);
}

/* Variant — danger (role-change-reload, apology) */
.tr-banner.tr-banner-danger {
  background: var(--ch-danger-bg);
  color: var(--ch-danger);
  border-color: var(--ch-danger-border);
}

/* Variant — accent (in-progress-on-another-device) */
.tr-banner.tr-banner-accent {
  background: var(--ch-accent-secondary);
  color: var(--ch-accent-primary-text, #b45309);
  border-color: var(--ch-accent-primary);
}

.tr-banner[hidden] {
  display: none;
}
:where(.tr-banner)[data-action-cta="false"] .tr-banner-cta {
  display: none;
}
:where(.tr-banner)[data-dismissible="false"] .tr-banner-dismiss {
  display: none;
}
