/* =============================================================================
   BUAMS AI new-ui — PROMO BAR

   Site-wide announcement strip above the header. Carries the free-trial offer,
   which previously did not appear until roughly nine sections down the home
   page.

   Sits in components/ rather than pages/ because it renders on every public
   page from the site layout (spec §L: a second use promotes a rule).

   Deliberately NOT sticky. The header below it already sticks; two stacked
   fixed strips eat a third of a phone viewport, and the offer only has to be
   seen once, not followed down the page. The sticky action on mobile is the
   bottom bar in landing.css, which is a different job.
   ============================================================================= */

.bui-promo {
  position: relative;
  z-index: 60;
  background: var(--bui-primary-800);
  color: #fff;
  font-size: var(--bui-text-sm);
}

.bui-promo-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--bui-space-2) var(--bui-space-4);
  padding-block: var(--bui-space-2);
  /* Room for the close button, which is absolutely positioned so the copy
     stays optically centred rather than being pushed off-centre by it. */
  padding-inline-end: var(--bui-space-10);
}

.bui-promo-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--bui-space-2) var(--bui-space-3);
  margin: 0;
  line-height: var(--bui-lh-snug);
}

.bui-promo-flag {
  padding: 2px var(--bui-space-2);
  border-radius: var(--bui-radius-pill);
  background: rgba(255, 255, 255, .16);
  font-size: var(--bui-text-overline);
  font-weight: var(--bui-fw-heavy);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bui-promo-points {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--bui-space-2);
}

.bui-promo-points strong { font-weight: var(--bui-fw-heavy); }

.bui-promo-dot {
  opacity: .5;
}

.bui-promo-actions {
  display: flex;
  align-items: center;
  gap: var(--bui-space-2);
}

.bui-promo-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--bui-space-1);
  padding: var(--bui-space-1) var(--bui-space-3);
  border-radius: var(--bui-radius-pill);
  background: #fff;
  color: var(--bui-primary-800);
  font-size: var(--bui-text-xs);
  font-weight: var(--bui-fw-heavy);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--bui-transition), box-shadow var(--bui-transition);
}

.bui-promo-cta:hover,
.bui-promo-cta:focus-visible {
  color: var(--bui-primary-900);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.bui-promo-cta .bi { font-size: .8em; }

.bui-promo-close {
  position: absolute;
  inset-block: 0;
  inset-inline-end: var(--bui-space-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  border: 0;
  background: none;
  color: #fff;
  opacity: .7;
  cursor: pointer;
  transition: opacity var(--bui-transition);
}

.bui-promo-close:hover,
.bui-promo-close:focus-visible { opacity: 1; }

/* The white focus ring from components/buttons.css is tuned for light
   surfaces and disappears on this one. */
.bui-promo-cta:focus-visible,
.bui-promo-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .bui-promo-inner {
    justify-content: flex-start;
    text-align: start;
    padding-inline-end: var(--bui-space-8);
  }

  /* "No credit card" is the first thing to go: the trial length and the entry
     price are what move a decision, and three clauses wrap to three lines on a
     narrow phone. */
  .bui-promo-points > span:nth-child(3),
  .bui-promo-points > span:nth-child(4) { display: none; }

  .bui-promo-close { inset-inline-end: var(--bui-space-1); }
}
