/* =========================================================================
   Video walkthrough card — Tweed Holiday Parks
   No HubL in here: this file is compiled once, not once per instance.
   Per-instance values arrive as custom properties set in module.html.
   ========================================================================= */

.thp-vwc {
  --thp-vwc-accent: #F68D76;
  --thp-vwc-text: #464646;
  --thp-vwc-border: #DEDEDE;
  --thp-vwc-thumb: 92px;
  --thp-vwc-radius: 6px;
  --thp-vwc-space-top: 30px;
  --thp-vwc-space-bottom: 34px;
  margin: var(--thp-vwc-space-top) 0 var(--thp-vwc-space-bottom);
  color: var(--thp-vwc-text);
}

/* ---------------- card ---------------- */

.thp-vwc__card {
  display: flex;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--thp-vwc-border);
  border-radius: var(--thp-vwc-radius);
  background: #fff;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.thp-vwc__card:hover {
  border-color: #cfcfcf;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .09);
}

.thp-vwc__card:active { transform: translateY(1px); }

.thp-vwc__card:focus-visible {
  outline: 2px solid var(--thp-vwc-accent);
  outline-offset: 3px;
}

.thp-vwc__thumb {
  position: relative;
  flex: 0 0 var(--thp-vwc-thumb);
  width: var(--thp-vwc-thumb);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: calc(var(--thp-vwc-radius) - 2px);
  background: #e9e9e9;
}

/* aspect-ratio fallback for older Safari */
@supports not (aspect-ratio: 9 / 16) {
  .thp-vwc__thumb::before { content: ""; display: block; padding-top: 177.78%; }
}

.thp-vwc__thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thp-vwc__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
  color: var(--thp-vwc-accent);
  transition: transform .2s ease;
}

.thp-vwc__play svg {
  width: 13px;
  height: 13px;
  transform: translateX(1px);
}

.thp-vwc__card:hover .thp-vwc__play { transform: translate(-50%, -50%) scale(1.08); }

.thp-vwc__duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
}

.thp-vwc__body { align-self: center; }

.thp-vwc__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--thp-vwc-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.3;
}

.thp-vwc__heading {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
}

.thp-vwc__copy {
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6e6e6e;
}

/* ---------------- lightbox ---------------- */

.thp-vwc__lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.thp-vwc__lb[hidden] { display: none; }

.thp-vwc__scrim {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: thp-vwc-fade .25s ease;
}

.thp-vwc__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: thp-vwc-rise .3s cubic-bezier(.2, .7, .3, 1);
}

.thp-vwc__player {
  position: relative;
  aspect-ratio: 9 / 16;
  height: min(84vh, calc(100vw * 16 / 9 - 48px));
  max-height: 84vh;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

@supports not (aspect-ratio: 9 / 16) {
  .thp-vwc__player {
    width: min(calc(84vh * 9 / 16), calc(100vw - 48px));
    height: min(84vh, calc((100vw - 48px) * 16 / 9));
  }
}

.thp-vwc__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}

.thp-vwc__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
}

.thp-vwc__close:hover { background: rgba(255, 255, 255, .26); }
.thp-vwc__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.thp-vwc__close svg { width: 14px; height: 14px; }

.thp-vwc__caption {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  letter-spacing: .03em;
  text-align: center;
  line-height: 1.5;
}

/* ---------------- player controls ---------------- */

.thp-vwc__controls {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 44px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}

.thp-vwc__ctl {
  display: grid;
  place-items: center;
  padding: 4px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.thp-vwc__ctl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.thp-vwc__ctl svg { width: 16px; height: 16px; }

.thp-vwc__bar {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .34);
  cursor: pointer;
}

.thp-vwc__bar:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }

.thp-vwc__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 3px;
  background: var(--thp-vwc-accent);
}

.thp-vwc__time {
  min-width: 38px;
  color: #fff;
  font-size: 11px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.thp-vwc__sound {
  position: absolute;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.thp-vwc__sound[hidden] { display: none; }
.thp-vwc__sound svg { width: 13px; height: 13px; }

/* ---------------- state + responsive ---------------- */

/* set on <html> while a lightbox is open */
.thp-vwc-lock { overflow: hidden; }

@media (max-width: 900px) {
  .thp-vwc__lb { padding: 14px; }
  .thp-vwc__player { height: min(80vh, calc(100vw * 16 / 9 - 28px)); }
  .thp-vwc__close { top: 20px; right: 18px; background: rgba(0, 0, 0, .5); }
}

@media (max-width: 480px) {
  .thp-vwc__card { gap: 14px; padding: 12px; }
  .thp-vwc__heading { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .thp-vwc__scrim,
  .thp-vwc__stage { animation: none; }
  .thp-vwc__card,
  .thp-vwc__play { transition: none; }
}

@keyframes thp-vwc-fade {
  from { opacity: 0 }
  to { opacity: 1 }
}

@keyframes thp-vwc-rise {
  from { opacity: 0; transform: translateY(14px) scale(.98) }
  to { opacity: 1; transform: none }
}
