/* =========================================================
   Headliners pop-up + zwevende tab
   Markup: inc/headliners.php · Gedrag: assets/js/headliners.js
   Los ge-enqueued (filemtime), niet via main.css.
========================================================= */

/* ======================================================
   Dialog
====================================================== */

.ls-headliners {
  width: min(960px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);

  background:
    radial-gradient(120% 60% at 50% 0%, rgba(145, 115, 63, .28), transparent 70%),
    var(--color-brand-blue-dark);
  color: var(--color-text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);

  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;

  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-soft) var(--ease-premium),
    transform var(--dur-slow) var(--ease-premium),
    overlay var(--dur-soft) allow-discrete,
    display var(--dur-soft) allow-discrete;
}

.ls-headliners:not([open]) {
  opacity: 0;
  transform: translateY(16px) scale(.97);
}

@starting-style {
  .ls-headliners[open] {
    opacity: 0;
    transform: translateY(24px) scale(.96);
  }
}

.ls-headliners::backdrop {
  background: rgba(10, 22, 38, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
  transition:
    opacity var(--dur-soft) ease,
    overlay var(--dur-soft) allow-discrete,
    display var(--dur-soft) allow-discrete;
}

.ls-headliners:not([open])::backdrop {
  opacity: 0;
}

@starting-style {
  .ls-headliners[open]::backdrop {
    opacity: 0;
  }
}

html.ls-headliners-lock {
  overflow: hidden;
}


/* ======================================================
   Sluitknop — sticky, blijft zichtbaar bij scrollen
====================================================== */

.ls-headliners__close {
  position: sticky;
  top: 12px;
  z-index: 2;

  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 12px 12px -56px auto;
  padding: 0;

  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .92);
  color: var(--color-brand-blue-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  cursor: pointer;

  transition:
    background-color var(--dur-fast) ease,
    transform var(--dur-base) var(--ease-soft);
}

.ls-headliners__close:hover {
  background: #fff;
  transform: rotate(90deg);
}

.ls-headliners__close:focus-visible {
  outline: 3px solid var(--color-brand-gold);
  outline-offset: 2px;
}


/* ======================================================
   Poster
====================================================== */

.ls-headliners__poster,
.ls-headliners__poster img {
  display: block;
  width: 100%;
  height: auto;
}

.ls-headliners__poster img {
  aspect-ratio: 1905 / 825;
  object-fit: cover;
  background: var(--color-brand-blue-dark);
}

@media (max-width: 640px) {
  .ls-headliners__poster img {
    aspect-ratio: 900 / 609;
  }
}


/* ======================================================
   Body + shop
====================================================== */

.ls-headliners__body {
  padding: clamp(20px, 4vw, 36px);
  padding-top: clamp(18px, 3vw, 28px);
}

.ls-headliners__eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-script);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: #D9BC85;
}

.ls-headliners__title {
  margin: 0 0 clamp(16px, 2.5vw, 24px);
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  line-height: 1.15;
  color: #fff;
}

.ls-headliners__shop {
  min-height: 250px;
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.ls-headliners__shop iframe {
  display: block;
  width: 100%;
}

/* Only visible when the mijnetickets embed failed to load */
.ls-headliners__shop:has(iframe) {
  display: block;
}

.ls-headliners__shop:not(:has(iframe)) {
  display: grid;
  place-items: center;
}

.ls-headliners__shop:has(iframe) .ls-headliners__fallback {
  display: none;
}


/* ======================================================
   Zwevende tab (linkerzijkant)
====================================================== */

.ls-headliners-tab {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: calc(var(--z-nav, 100) - 10);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px 16px 8px;

  border: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-brand-blue);
  color: #fff;
  box-shadow: 4px 6px 20px rgba(0, 0, 0, .22);
  cursor: pointer;

  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;

  translate: -110% -50%;
  visibility: hidden;
  transition:
    translate var(--dur-slow) var(--ease-premium),
    padding var(--dur-base) var(--ease-soft),
    background-color var(--dur-base) ease,
    visibility 0s linear var(--dur-slow);
}

.ls-headliners-tab.is-visible {
  translate: 0 -50%;
  visibility: visible;
  transition:
    translate var(--dur-slow) var(--ease-premium),
    padding var(--dur-base) var(--ease-soft),
    background-color var(--dur-base) ease,
    visibility 0s;
}

/* Out of the way while the mobile menu is open (header.js) */
body.ls-nav-open .ls-headliners-tab.is-visible {
  translate: -110% -50%;
  visibility: hidden;
}

.ls-headliners-tab::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--color-brand-gold);
}

.ls-headliners-tab:hover {
  padding-left: 14px;
  background: var(--color-brand-blue-dark);
}

.ls-headliners-tab:focus-visible {
  outline: 3px solid var(--color-brand-gold);
  outline-offset: 2px;
}

.ls-headliners-tab__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.ls-headliners-tab__icon {
  flex-shrink: 0;
  color: #D9BC85;
}

.ls-headliners-tab.is-visible .ls-headliners-tab__icon {
  animation: ls-headliners-nudge 1.6s var(--ease-soft) .8s 3;
}

@keyframes ls-headliners-nudge {
  0%, 60%, 100% { transform: rotate(0); }
  15%           { transform: rotate(-14deg); }
  30%           { transform: rotate(10deg); }
  45%           { transform: rotate(-6deg); }
}

@media (max-width: 640px) {
  .ls-headliners-tab {
    top: 58%;
    gap: 8px;
    padding: 12px 8px 12px 6px;
    font-size: .72rem;
  }
}


/* ======================================================
   Reduced motion / print
====================================================== */

@media (prefers-reduced-motion: reduce) {
  .ls-headliners,
  .ls-headliners::backdrop,
  .ls-headliners-tab,
  .ls-headliners-tab.is-visible,
  .ls-headliners__close {
    transition: none;
  }

  .ls-headliners-tab.is-visible .ls-headliners-tab__icon {
    animation: none;
  }
}

@media print {
  .ls-headliners,
  .ls-headliners-tab {
    display: none !important;
  }
}
