/* Water Tower Music — release video cards (click to play) */

.wtm-video-card {
  position: relative;
  width: 100%;
  background: #000;
  border: 2px solid #fff;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
}

/* A lone video gets a wider, centred card instead of a half-width one. */
.wtm-video-card-single {
  width: 80%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.wtm-video-thumb-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.wtm-video-thumb-button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

/* This theme has no global `img { max-width: 100% }`, and single-release.php
   carries `.wp-post-image { width: 90% !important }`. Neither applies to these
   thumbnails, but the box is pinned anyway so artwork cannot escape it. */
.wtm-video-thumb {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 700ms ease, filter 700ms ease;
}
.wtm-video-thumb-button:hover .wtm-video-thumb { transform: scale(1.06); filter: brightness(.76); }

.wtm-video-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 4;
  width: 72px; height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.65), inset 0 -12px 24px rgba(0,0,0,.22);
  transition: transform 280ms ease, background 280ms ease;
  pointer-events: none;
}
.wtm-video-thumb-button:hover .wtm-video-play-icon {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(255,255,255,.28);
}

.wtm-video-play-icon::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.32);
  animation: wtmVideoPulse 1.8s ease-out infinite;
}

.wtm-video-play-triangle {
  position: absolute;
  top: 50%; left: 54%;
  width: 0; height: 0;
  transform: translate(-50%, -50%);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #fff;
}

@keyframes wtmVideoPulse {
  0%   { transform: scale(.88); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.wtm-video-embed {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.wtm-video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Shown only when the embed is refused or the link cannot be parsed. */
.wtm-video-message {
  display: none;
  width: 100%;
  padding: 28px 20px;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
}
.wtm-video-message a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); }
.wtm-video-message-visible { display: block; }

.wtm-video-card.is-playing .wtm-video-thumb-button { display: none; }
.wtm-video-card.is-playing .wtm-video-embed { display: block; }

.wtm-video-card.has-error .wtm-video-thumb-button,
.wtm-video-card.has-error .wtm-video-embed { display: none; }
.wtm-video-card.has-error .wtm-video-message { display: block; }

@media screen and (max-width: 767px) {
  .wtm-video-card-single { width: 100%; }
  .wtm-video-play-icon { width: 56px; height: 56px; }
  .wtm-video-play-triangle { border-top-width: 11px; border-bottom-width: 11px; border-left-width: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .wtm-video-thumb, .wtm-video-play-icon { transition: none; }
  .wtm-video-play-icon::before { animation: none; }
}
