/* Live class offers: shared styles for every page that carries
   <div data-booking-offer="<slug>" data-offer-state="closed|live">.
   /offer.js sets data-offer-priced when the catalogue lists the program with a
   price (payments open or not), and flips data-offer-state to "live" only when
   the program is also bookable and payable; everything else stays as the HTML
   wrote it.
   Page stylesheets own the layout; this file owns the state switch and the
   pieces offer.js writes (the time chips). Tokens come from site.css. */

/* Show only the copy that matches the element's state. */
[data-booking-offer][data-offer-state="closed"] [data-offer-when="live"],
[data-booking-offer][data-offer-state="live"] [data-offer-when="closed"],
[data-booking-offer]:not([data-offer-state]) [data-offer-when="live"] { display: none !important; }

/* Price copy follows data-offer-priced, independent of the booking state. */
[data-booking-offer]:not([data-offer-priced]) [data-offer-when-priced="yes"],
[data-booking-offer][data-offer-priced] [data-offer-when-priced="no"] { display: none !important; }

/* A value field that offer.js has not filled hides its own wrapper text. */
[data-offer-field]:empty { display: none; }

/* Next open times: up to three chips, written as <span class="offer-time"><b>SEN 16</b> 19.00</span>. */
.offer-time {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 4px 8px 3px; border-radius: 5px;
  background: var(--forest, #06251A); color: #fff;
  font: 700 .9rem/1.15 var(--f-body, system-ui, sans-serif);
  font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap;
}
.offer-time b { font-weight: 700; font-size: .72rem; letter-spacing: .07em; color: var(--gold, #F4B740); }
[data-offer-field="next"] { display: flex; flex-wrap: wrap; gap: 5px; min-height: 26px; }
[data-offer-field="next"]:empty { display: flex; }

/* Bundles (PACKAGES-DESIGN 6.4, 12.1). The row template and the container ship
   hidden; offer.js clones rows and unhides the container only when there is
   an offer. Copy for one sale mode or teaching language hides otherwise. */
[data-offer-bundles][hidden] { display: none !important; }
[data-booking-offer]:not([data-offer-sale="bundle"]) [data-offer-when-sale="bundle"],
[data-booking-offer][data-offer-sale="bundle"] [data-offer-when-sale="single"],
[data-booking-offer][data-offer-sale="single"] [data-offer-when-sale="plans"],
[data-booking-offer]:not([data-offer-taught="en"]) [data-offer-when-taught="en"] { display: none !important; }
