/*
 * Backsta.ge — the landing page's show list
 * (app/(landing-page)/landing-page/landing-page.css), dressed in the theme.
 *
 * Text, fonts and headings are inherited from the theme. Every colour is a
 * --bst-* variable a site can override, e.g. `.bst { --bst-btn-bg: #c00; }`.
 * On block themes the buy button also carries `wp-element-button`, so the
 * theme styles it like its own buttons and the --bst-btn-* variables are
 * only fallbacks there (see "Buy button" below).
 */

.bst {
  --bst-divider: color-mix(in srgb, currentColor 15%, transparent);
  --bst-muted: color-mix(in srgb, currentColor 7%, transparent);
  /* Block themes: filled in their primary (or text) colour. Classic themes
     without colour presets: outlined in the text colour, which reads on
     light and dark sites alike. */
  --bst-btn-bg: var(--wp--preset--color--primary, var(--wp--preset--color--contrast, transparent));
  --bst-btn-text: var(--wp--preset--color--base, currentColor);
  --bst-btn-border: var(--wp--preset--color--primary, var(--wp--preset--color--contrast, currentColor));
  --bst-btn-radius: 0.375rem;
  /* Unset by default: --bst-date-bg (falls back to --bst-muted),
     --bst-date-text (the text colour), and the waitlist button's
     --bst-btn-waitlist-bg (transparent), --bst-btn-waitlist-text (the text
     colour) and --bst-btn-waitlist-border (its text colour). */
  --bst-badge-soldout-bg: #dc2626;
  --bst-badge-soldout-text: #fafafa;
  --bst-badge-fewtickets-bg: #f59e0b;
  --bst-badge-fewtickets-text: #fff;
  --bst-badge-custom-bg: var(--wp--preset--color--contrast, #171717);
  --bst-badge-custom-text: var(--wp--preset--color--base, #fafafa);

  /* No container-type here: size containment makes the list report zero
     width, so page builders that size a widget to its content (Elementor's
     flex containers) collapse it. */
  color: inherit;
  font: inherit;
}

.bst *,
.bst *::before,
.bst *::after {
  box-sizing: border-box;
}

.bst-section + .bst-section,
.bst-empty + .bst-section {
  margin-top: 2.5rem;
}

.bst .bst-heading {
  margin: 0 0 1rem;
}

.bst-rows > * + * {
  border-top: 1px solid var(--bst-divider);
}

.bst .bst-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}

.bst-rows > :first-child {
  padding-top: 0;
}

.bst-rows > :last-child {
  padding-bottom: 0;
}

/* Date badge */
.bst-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: var(--bst-date-bg, var(--bst-muted));
  color: var(--bst-date-text, inherit);
  text-align: center;
}

.bst-date-month {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.7;
}

.bst-date-day {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
}

/* City and venue */
.bst-city-venue {
  display: block;
  flex: 1;
  min-width: 0;
}

.bst-city,
.bst-venue {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bst-city {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.bst-venue {
  margin-top: -0.125rem;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.7;
}

.bst-dot {
  display: inline-block;
  width: 0.25rem;
  height: 0.25rem;
  margin: 0 0.5rem;
  border-radius: 9999px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.5;
}

.bst-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.625rem;
}

/* Status badges */
.bst-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: calc(10px * 1.5 + 0.25rem);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}

.bst-badge-premiere {
  border: 1px solid var(--bst-divider);
}

.bst-badge-soldout {
  background: var(--bst-badge-soldout-bg);
  color: var(--bst-badge-soldout-text);
}

.bst-badge-fewtickets {
  background: var(--bst-badge-fewtickets-bg);
  color: var(--bst-badge-fewtickets-text);
}

.bst-badge-extra,
.bst-badge-test {
  background: var(--bst-muted);
}

.bst-badge-custom {
  background: var(--bst-badge-custom-bg);
  color: var(--bst-badge-custom-text);
}

/* Buy button. Classic themes (no .wp-element-button on it): styled by the
   --bst-btn-* variables with ordinary priority. WordPress prints a dark grey
   `:root :where(.wp-element-button)` default on every site, which is why the
   class is left off there. */
.bst .bst-btn:where(:not(.wp-element-button)) {
  background: var(--bst-btn-bg);
  color: var(--bst-btn-text);
  border: 1px solid var(--bst-btn-border);
  border-radius: var(--bst-btn-radius);
  font-family: inherit;
  text-decoration: none;
}

/* Block themes: the theme's own button style wins; these only fill in what
   it leaves out. */
:where(.bst .bst-btn.wp-element-button) {
  background: var(--bst-btn-bg);
  color: var(--bst-btn-text);
  border: 1px solid var(--bst-btn-border);
  border-radius: var(--bst-btn-radius);
  font-family: inherit;
}

/* Waitlist button: a secondary action, outlined by default — on block
   themes too, where it otherwise keeps the theme's font and radius. */
.bst .bst-btn-waitlist {
  background: var(--bst-btn-waitlist-bg, transparent);
  color: var(--bst-btn-waitlist-text, inherit);
  border: 1px solid var(--bst-btn-waitlist-border, currentColor);
}

/* Size and layout always come from here, so a theme's big call-to-action
   padding doesn't blow up the rows. */
.bst .bst-btn {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  transition: transform 150ms ease;
}

/* The label and the invisible ghost (the other button's label) share one
   grid cell, so every button is as wide as the wider of "Køb billet" and
   "Venteliste". The ghost is only there while an upcoming show has a
   waitlist; `.bst-btn-ghost { display: none; }` turns it off altogether. */
.bst-btn-label,
.bst-btn-ghost {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.bst-btn-ghost {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.bst a.bst-row:hover .bst-btn {
  transform: scale(1.05);
}

.bst .bst-btn-faded {
  opacity: 0.4;
}

.bst a.bst-row:hover .bst-btn-faded {
  transform: none;
}

.bst-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Wide / narrow labels ("Køb billet" / "Køb"), by screen width like the
   landing page's `sm:` breakpoint. */
.bst-wide {
  display: none;
}

@media (min-width: 640px) {
  .bst-wide {
    display: inline;
  }

  .bst-narrow {
    display: none;
  }

  .bst .bst-row {
    gap: 1rem;
  }

  .bst-date {
    width: 3.5rem;
    height: 3.5rem;
  }

  .bst-date-day {
    font-size: 1.25rem;
  }

  .bst-city {
    font-size: 1.125rem;
  }

  .bst-venue {
    font-size: 0.875rem;
  }
}

/* Empty state */
.bst-empty {
  padding: 3rem 1.5rem;
  border: 1px dashed color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 0.5rem;
  text-align: center;
}

.bst-empty p {
  margin: 0;
  font-weight: 500;
}

/* Editors only */
.bst-notice {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #f59e0b;
  border-radius: 0.375rem;
  background: color-mix(in srgb, #f59e0b 10%, transparent);
  font-size: 0.875rem;
}

.bst-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bst a.bst-row:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
