/* css/components/video.css
   The shared How-To video: an inline poster card (embedded in the product
   modal) and a full-screen overlay viewer (opened from the card's Expand
   control and from the warranty page). Themed with the site tokens so it reads
   as part of the instrument-panel UI, not a bolted-on player. */

/* ---------- inline embed (sits under the product image viewer) ---------- */
.vo-inline {
  margin: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .015);
}

.vo-inline-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  display: grid;
  place-items: center;
}
.vo-inline-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}
.vo-inline-stage .vo-video,
.vo-inline-stage .vo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vo-play {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 24, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.vo-play:hover { transform: scale(1.04); border-color: var(--brand-600); background: rgba(10, 14, 24, .7); }
.vo-play:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.vo-play-icon {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand-600, #21bca5);
  color: #04120f;
  flex: none;
  padding-left: 1px; /* optical centering of the triangle */
}

.vo-inline-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  font-size: .84rem;
  color: var(--muted);
}
.vo-expand {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  border-radius: 7px;
  padding: 4px 10px;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.vo-expand:hover { border-color: var(--brand-600); }
.vo-expand:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 1px; }

/* ---------- full-screen overlay ---------- */
.vo-overlay[hidden] { display: none; }
.vo-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: max(16px, 4vh) 16px;
}
.vo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 14, .82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.vo-panel {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--menu, #0b1120);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.vo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.vo-title { color: var(--ink); font-size: .95rem; font-weight: 600; }
.vo-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}
.vo-close:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.vo-close:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 1px; }

.vo-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: calc(92vh - 56px);
}
.vo-stage .vo-video,
.vo-stage .vo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body.vo-open { overflow: hidden; }

/* ---- Framed embed (warranty page): titled frame hosting the player ---- */
.vo-framed {
  margin: 4px auto 16px;
  max-width: 560px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(255, 255, 255, .12));
  background: rgba(0, 0, 0, .35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.vo-framed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(120deg, rgba(33, 188, 165, .10), rgba(162, 0, 255, .12));
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, .10));
}
.vo-framed-title {
  font-weight: 800;
  letter-spacing: .04em;
  font-size: .92rem;
  background: linear-gradient(120deg, var(--brand-600, #21bca5), #bf7dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.vo-framed-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}
.vo-framed-stage .vo-frame,
.vo-framed-stage .vo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
