/* dp-clip.css — the video share page (views/share/share-clip.ejs, public/js/dp-clip.js).
 * A phone gets the clip full screen, cropped to fill. A wide screen gets the clip whole, at full height, on the
 * homepage's violet. The card parts match the homepage's Discover wall (dp-home-discover.css .dpd-card__*). */
.clip {
  --clip-body: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --clip-display: 'Zalando Sans Expanded', 'DM Sans', system-ui, sans-serif;
  --clip-gutter: 16px;
  --clip-top: max(14px, env(safe-area-inset-top));
  --clip-bottom: max(18px, env(safe-area-inset-bottom));
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: #000; color: #fff; font-family: var(--clip-body); -webkit-font-smoothing: antialiased;
}
html:has(> .clip) { height: 100%; overflow: hidden; background: #000; }

.clip__stage { position: fixed; inset: 0; overflow: hidden; background: #120634; }
.clip__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.clip__tap { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.clip__tap:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.clip__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 2, 40, 0.42), rgba(10, 2, 40, 0) 118px),
    linear-gradient(to top, rgba(10, 2, 40, 0.86), rgba(10, 2, 40, 0.46) 170px, rgba(10, 2, 40, 0) 320px);
}
.clip__bigplay {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: rgba(10, 2, 40, 0.55); display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.clip__bigplay[hidden] { display: none; }
.clip__bigplay svg { width: 38px; height: 38px; fill: #fff; }

/* The round buttons: X, sound, share, report. */
.clip__btn {
  appearance: none; border: 0; padding: 0; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; text-decoration: none;
  background: rgba(10, 2, 40, 0.42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 160ms ease, background 160ms ease; -webkit-tap-highlight-color: transparent;
}
.clip__btn:hover { background: rgba(10, 2, 40, 0.62); }
.clip__btn:active { transform: scale(0.94); }
.clip__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.clip__btn[hidden] { display: none; }
.clip__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.clip__x { position: fixed; z-index: 3; left: var(--clip-gutter); top: var(--clip-top); }
.clip__x svg { stroke-width: 2.6; }
.clip__tools { position: fixed; z-index: 3; right: var(--clip-gutter); top: var(--clip-top); display: flex; gap: 8px; }
.clip__ico-on { display: none; }
[data-clip-sound][aria-pressed="true"] .clip__ico-on { display: block; }
[data-clip-sound][aria-pressed="true"] .clip__ico-off { display: none; }

/* The credit and the title card, as on a Discover card. */
.clip__foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 0 var(--clip-gutter) calc(var(--clip-bottom) + var(--clip-veil, 0px));
  display: flex; flex-direction: column; gap: 14px; pointer-events: none;
  transition: padding-bottom 200ms ease;
}
.clip__foot a { pointer-events: auto; }
.clip__who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.clip__by { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; min-width: 0; color: #fff; text-decoration: none; align-self: flex-start; pointer-events: auto; }
.clip__avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #7d58f7;
  display: inline-flex; align-items: center; justify-content: center; font: 800 15px/1 var(--clip-body); color: #fff;
}
.clip__name { font: 700 18px/1.15 var(--clip-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; text-shadow: 0 1px 8px rgba(10, 2, 40, 0.45); }
.clip__meta { display: flex; align-items: center; gap: 10px; max-width: 100%; min-width: 0; font: 500 14px/1.2 var(--clip-body); }
.clip__meta:empty { display: none; }
.clip__park { color: rgba(255, 255, 255, 0.92); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clip__views { flex: none; display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, 0.78); font-variant-numeric: tabular-nums; }
.clip__views svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.clip__caption { margin: 0; font: 400 14px/1.35 var(--clip-body); color: rgba(255, 255, 255, 0.9); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.clip__title {
  flex: none; position: relative; display: block; width: 92px; margin-top: 5px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden;
  background: linear-gradient(160deg, #7d58f7, #3a16a8); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  color: #fff; text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease;
}
.clip__title:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.clip__title:active { transform: scale(0.97); }
.clip__title:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.clip__title img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.clip__title .clip__logo {
  inset: auto 0 6% 0; margin: 0 auto; width: 88%; height: auto; max-height: 45%; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85)) drop-shadow(0 4px 6px rgba(10, 2, 40, 0.6));
}
.clip__tname { position: absolute; left: 6px; right: 6px; bottom: 8px; font: 800 12px/1.1 var(--clip-display); text-align: center; }

/* The portal page's Get Tickets pill (portal.css .pp-tix__btn). */
.clip__tix {
  position: relative;
  height: 56px; border-radius: 999px; background: #fff; color: #000; text-decoration: none;
  display: flex; align-items: center; justify-content: center; font: 700 18px/1 var(--clip-body);
  transition: transform 160ms ease;
}
.clip__tix:active { transform: scale(0.98); }
.clip__tix:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Short phones: the card gives the video its room back. */
@media (max-height: 600px) {
  .clip__title { width: 74px; }
  .clip__tix { height: 50px; font-size: 17px; }
  .clip__foot { gap: 10px; }
}

/* Wide screens: the whole clip at full height, on the homepage's violet. */
@media (min-width: 761px) and (min-aspect-ratio: 1 / 1) {
  .clip, html:has(> .clip) { background: #6a40f0; }
  .clip { --clip-gutter: 24px; --clip-top: 24px; }
  .clip__stage {
    inset: 0; margin: auto; border-radius: 24px; box-shadow: 0 24px 80px rgba(22, 6, 72, 0.5);
    height: calc(100dvh - 48px); width: auto; max-width: calc(100vw - 48px);
    aspect-ratio: var(--clip-aspect, 9 / 16);
  }
  .clip--landscape .clip__stage { height: auto; width: min(calc(100vw - 200px), calc((100dvh - 48px) * 16 / 9)); }
  .clip__foot { --clip-gutter: 18px; padding-bottom: max(18px, calc(var(--clip-veil, 0px) - 6px)); }
}

/* An embed is its own small frame: no gutters to the page, and it always fills. */
.clip--embed { --clip-top: 10px; --clip-gutter: 12px; --clip-bottom: 12px; }
.clip--embed .clip__stage { inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; border-radius: 0; box-shadow: none; aspect-ratio: auto; }
.clip--embed .clip__title { width: 72px; }
.clip--embed .clip__name { font-size: 15px; }
.clip--embed .clip__avatar { width: 28px; height: 28px; }
.clip--embed .clip__meta { font-size: 12px; }
.clip--embed .clip__tix { height: 44px; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .clip__btn, .clip__title, .clip__tix { transition: none; }
}
