/* Reusable "watch the video" help widget.
   Trigger: small play-icon pill. Target: centred modal with a YouTube embed.
   Self-contained (no dependency on dashboard/style.css) so it works on the
   login page and anywhere else that only loads base.css. */

/* ── Site-wide bar below the top nav ───────────────────────────────────────────
   Trigger is centred on the 66% mark of the page width. */
.vh-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 20px 16px;
  box-sizing: border-box;
}
.vh-bar + main .app-section {
  padding-top: 0;
  margin-top: 0;
}
.vh-bar > .vh-bar-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
}
.vh-bar .vh-bar-slot {
  margin-left: 71%;
  transform: translateX(-50%);
}
@media (max-width: 720px) {
  .vh-bar .vh-bar-slot {
    margin-left: 0;
    transform: none;
    margin-inline: auto;
  }
}

/* ── Trigger pill (ghost / quiet) ───────────────────────────────────────────
   Deliberately understated: thin outline, no solid fill, muted text and a
   small outlined play icon. A tertiary help affordance, not a primary button. */
.vh-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--accent, #2f6bff);
  opacity: 0.72;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.vh-trigger:hover,
.vh-trigger:focus-visible {
  opacity: 1;
  outline: none;
}
.vh-trigger .vh-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid currentColor;   /* outlined, not filled */
  background: transparent;
  color: var(--accent, #2f6bff);
  flex-shrink: 0;
}
.vh-trigger .vh-play svg { width: 8px; height: 8px; }

/* Icon-only variant: no text, slightly larger icon for a clear tap target. */
.vh-trigger.vh-icon-only { padding: 4px; gap: 0; }
.vh-trigger.vh-icon-only .vh-play { width: 20px; height: 20px; }
.vh-trigger.vh-icon-only .vh-play svg { width: 10px; height: 10px; }

/* Prominent variant (login page only): no solid fill - light outlined play
   circle with medium-weight blue text, just larger/bolder than the quiet
   version. Teaches users the icon before they meet it site-wide. */
.vh-trigger.vh-prominent {
  opacity: 1;
  gap: 9px;
  padding: 6px 6px;
  border: none;
  background: transparent;
  color: var(--accent, #2f6bff);
  font-size: 1rem;
  font-weight: 600;
  transition: opacity 0.15s ease;
}
.vh-trigger.vh-prominent:hover,
.vh-trigger.vh-prominent:focus-visible {
  opacity: 0.82;
}
.vh-trigger.vh-prominent .vh-play {
  width: 24px;
  height: 24px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: var(--accent, #2f6bff);
}
.vh-trigger.vh-prominent .vh-play svg { width: 11px; height: 11px; }
.vh-trigger.vh-prominent .vh-play svg { width: 12px; height: 12px; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
dialog.vh-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  border: none;
  padding: 0;
  background: transparent;
  /* Adapt to the viewport: never wider than 90vw, and clamp so a 16:9 box
     never exceeds 80vh tall. min() keeps it sensible on any screen. */
  width: min(90vw, 142vh, 1100px);
  max-width: 90vw;
  overflow: visible;
}
dialog.vh-modal::backdrop {
  background: rgba(15, 22, 45, 0.66);
}
.vh-box {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.vh-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.vh-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.vh-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease;
}
.vh-close:hover,
.vh-close:focus-visible {
  background: rgba(0, 0, 0, 0.85);
  outline: none;
}

@media (max-width: 720px) {
  dialog.vh-modal {
    width: min(94vw, 142vh);
    max-width: 94vw;
  }
}
