/*
 * Video Library: library page, cards, video page and email gate (T7, T8, T10).
 * Moved from the approved prototype's mockup.css (.vl-* component rules); placeholder art and the fake player
 * controls stay in the prototype. Palette and type from the valuexpose child theme: #179DE9 accent, #5E7699 body
 * text, #101D3E headings, #FF861C highlight, Open Sans.
 */

/* -- Page banner (.ve-page-header uses a background image set per page in the builder) */
.vl-banner.ve-page-header {
  background: #101d3e url('banner.jpg') center / cover no-repeat;
  padding: 40px 0 !important;
}
.vl-banner .et_pb_row { padding: 0; }
.vl-banner .et_pb_text_inner p { margin: 0; max-width: 720px; }

/* -- Layout */
.vl-section { background: #f8fbff; padding: 40px 0 70px; }
.vl-wrap { width: 80%; max-width: 1280px; margin: 0 auto; }
@media (max-width: 980px) { .vl-wrap { width: 90%; } }

/* -- Filter bar */
.vl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(16, 18, 62, 0.04);
}
.vl-field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.vl-field-search { flex: 2 1 280px; }
.vl-field-grow { flex: 1 1 180px; }
.vl-field label { font-size: 13px; font-weight: 700; color: #101d3e; }
.vl-input, .vl-select {
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  font: 400 16px 'Open Sans', Helvetica, Arial, sans-serif;
  color: #101d3e;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.vl-input::placeholder { color: #5e7699; }
.vl-input:focus, .vl-select:focus { outline: 2px solid #179de9; outline-offset: 0; border-color: #179de9; }
.vl-search-wrap { position: relative; }
.vl-search-wrap svg { position: absolute; left: 14px; top: 13px; color: #5e7699; }
.vl-search-wrap .vl-input { padding-left: 42px; }
.vl-toggle { display: flex; align-items: center; gap: 8px; height: 44px; font-size: 14px; color: #5e7699; cursor: pointer; }
.vl-toggle input { accent-color: #179de9; width: 18px; height: 18px; }
.vl-clear {
  height: 44px;
  padding: 0 22px;
  border: 2px solid #179de9;
  border-radius: 32px;
  background: #fff;
  color: #179de9;
  font: 700 14px 'Open Sans', Helvetica, Arial, sans-serif;
  cursor: pointer;
}
.vl-clear:hover { background: #179de9; color: #fff; }
.vl-clear[hidden], .vl-field[hidden], .vl-toggle[hidden], .vl-grid[hidden], .vl-empty[hidden] { display: none; }

/* -- Result bar */
.vl-resultbar { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 20px; }
.vl-count { font-size: 16px; font-weight: 700; color: #101d3e; }
.vl-note { font-size: 13px; color: #5e7699; }

/* -- Grid: 3 per row desktop, 2 tablet, 1 phone; equal heights per row */
.vl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .vl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .vl-grid { grid-template-columns: 1fr; } }

/* -- Card */
.vl-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 24px rgba(16, 18, 62, 0.06); display: flex; }
.vl-card-link { display: flex; flex-direction: column; width: 100%; text-decoration: none; transition: transform 0.2s; }
.vl-card:hover { box-shadow: 0 8px 32px rgba(23, 157, 233, 0.22); }
.vl-card:hover .vl-card-link { transform: translateY(-2px); }
.vl-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #179de9; }
.vl-tab {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: #1727e9;
  color: #fff;
  font: 700 11px/1 'Open Sans', Helvetica, Arial, sans-serif;
  letter-spacing: 0.06em;
  padding: 9px 14px;
}
.vl-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: rgba(16, 29, 62, 0.82);
}
.vl-play::after { content: ''; position: absolute; left: 21px; top: 16px; border: 11px solid transparent; border-left: 17px solid #fff; border-right: 0; }
.vl-badges { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.vl-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 700 12px/1 'Open Sans', Helvetica, Arial, sans-serif;
  border-radius: 8px;
  padding: 6px 9px;
}
.vl-badge-length { right: 12px; bottom: 12px; background: rgba(16, 29, 62, 0.88); color: #fff; }
.vl-badge-new { right: 12px; top: 12px; background: #ff861c; color: #fff; }
.vl-badge-lock { left: 12px; bottom: 12px; background: #fff; color: #101d3e; padding: 6px 7px; }
.vl-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.vl-card-title { margin: 0; padding: 0 0 10px; font: 700 20px/26px 'Open Sans', Helvetica, Arial, sans-serif; color: #179de9; }
.vl-card-sub { margin: 0 0 18px; font-size: 14px; line-height: 21px; color: #5e7699; }
.vl-progress { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; font-weight: 700; color: #5e7699; }
.vl-progress-bar { flex: 1; height: 6px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.vl-progress-bar i { display: block; height: 100%; background: #179de9; }
.vl-progress span { white-space: nowrap; }
.vl-progress-bar + span { flex: none; }
.vl-watched { color: #179de9; }
.vl-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #179de9; color: #fff; font-size: 12px; }
.vl-button {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #179de9;
  color: #fff;
  border-radius: 32px;
  font: 700 14px/1 'Open Sans', Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  padding: 12px 22px;
}
.vl-card-link:hover .vl-button, a.vl-button:hover { background: #1727e9; }
.vl-button-ghost { background: #fff; color: #179de9; border: 2px solid #179de9; padding: 10px 22px; }
a.vl-button { text-decoration: none; margin-top: 0; }
a.vl-button-ghost:hover { background: #179de9; color: #fff; }

/* -- Empty state */
.vl-empty { text-align: center; background: #fff; border-radius: 16px; padding: 56px 24px; }
.vl-empty h3 { color: #101d3e; font-weight: 700; padding-bottom: 14px; }

/* -- Video page */
.vl-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #179de9; text-decoration: none; margin-bottom: 20px; }
.vl-back svg { transform: rotate(180deg); }
.vl-video-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
@media (max-width: 980px) { .vl-video-layout { grid-template-columns: 1fr; } }
.vl-panel { background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(16, 18, 62, 0.04); }
.vl-locked {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px;
  aspect-ratio: 16 / 9; border-radius: 16px 16px 0 0; background: #101d3e url('banner.jpg') center / cover; color: #fff; padding: 24px;
}
.vl-locked h2 { color: #fff; font-size: 26px; font-weight: 700; padding: 0; }
.vl-locked p { margin: 0; color: #fff; max-width: 440px; }
.vl-locked-icon { width: 56px; height: 56px; border-radius: 50%; background: #fff; color: #101d3e; display: flex; align-items: center; justify-content: center; }
.vl-locked-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.vl-locked .vl-button-ghost { background: transparent; color: #fff; border-color: #fff; }
.vl-locked a.vl-button-ghost:hover { background: #fff; color: #101d3e; }
.vl-info { padding: 28px 28px 32px; }
.vl-info .vl-tab { position: static; display: inline-block; border-radius: 6px; margin-bottom: 14px; }
.vl-info h1 { color: #101d3e; font-size: 32px; line-height: 130%; padding: 0 0 8px; font-weight: 700; }
.vl-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: #5e7699; margin-bottom: 18px; }
.vl-info p { color: #5e7699; font-size: 16px; line-height: 24px; }
.vl-side { padding: 22px; }
.vl-side h2, .vl-block-title { font-size: 20px; font-weight: 700; color: #101d3e; padding: 0 0 14px; }
.vl-list { list-style: none; margin: 0; padding: 0; }
.vl-list li { margin: 0; padding: 0; }
.vl-list button, .vl-list a {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; font: 600 14px/20px 'Open Sans', Helvetica, Arial, sans-serif; color: #5e7699; text-decoration: none;
}
.vl-list button:hover, .vl-list a:hover { background: #f8fbff; color: #179de9; }
.vl-list .is-current { background: #ecf4ff; color: #101d3e; }
.vl-time { flex: none; width: 42px; color: #179de9; font-weight: 700; }
.vl-side-next { margin-top: 28px; }
.vl-next-index { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: #101d3e; text-align: center; font-size: 12px; line-height: 24px; }
.vl-block { margin-top: 48px; }

/* -- Email capture modal */
.vl-modal { position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; background: rgba(13, 22, 42, 0.7); padding: 20px; }
.vl-modal.is-open { display: flex; }
.vl-dialog { background: #fff; border-radius: 16px; width: 100%; max-width: 440px; padding: 32px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35); }
.vl-dialog h2 { color: #101d3e; font-size: 24px; padding: 0 0 8px; font-weight: 700; }
.vl-dialog p { color: #5e7699; margin: 0 0 18px; padding: 0; }
.vl-dialog .vl-input { margin-bottom: 14px; }
.vl-dialog-actions { display: flex; align-items: center; gap: 16px; }
.vl-dialog button.vl-button { border: 0; cursor: pointer; }
.vl-skip { border: 0; background: transparent; color: #5e7699; font: 600 14px 'Open Sans', sans-serif; cursor: pointer; text-decoration: underline; }
.vl-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1000000; background: #101d3e; color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; display: none; }
.vl-toast.is-open { display: block; }

/* -- Product additions: real thumbnails, hover preview, the Presto player, focus, loading */
.vl-thumb-img, .vl-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vl-preview { z-index: 1; }
.vl-player { position: relative; border-radius: 16px 16px 0 0; overflow: hidden; background: #101d3e; }
.vl-card-link:focus-visible, .vl-back:focus-visible, .vl-list a:focus-visible, .vl-list button:focus-visible, .vl-clear:focus-visible,
a.vl-button:focus-visible, .vl-toggle input:focus-visible, .vl-dialog button:focus-visible { outline: 2px solid #179de9; outline-offset: 2px; }
.vl-grid[aria-busy='true'] { opacity: 0.6; transition: opacity 0.2s; }
.vl-dialog-error { color: #ff861c; font-weight: 600; font-size: 14px; margin: -6px 0 12px; }
.vl-dialog-error[hidden] { display: none; }
