/* Sheridan Media Videos
 * Sized by the box it sits in (container queries), not the window, so the
 * same markup works in a full-width page, a two-column layout, or a narrow
 * sidebar widget. Themes can restyle via the --smv-* variables. */
.smv {
  --smv-gap: 12px;
  --smv-radius: 12px;
  --smv-accent: #ffca41;
  --smv-navy: #262d66;
  --smv-text: inherit;
  --smv-muted: #5b6470;
  container-type: inline-size;
  container-name: smv;
  margin: 0 0 1.5em;
  color: var(--smv-text);
}
.smv *, .smv *::before, .smv *::after { box-sizing: border-box; }
/* 1.0.1: themes (e.g. the sheridanmedia.com home widget area) float every div
   in a widget. A floated container-query box shrinks to zero width, so the
   videos vanished. Force full width and cancel theme floats inside. */
.smv { display: block !important; width: 100% !important; max-width: 100% !important; float: none !important; clear: both; }
.smv div, .smv ul, .smv li, .smv nav, .smv h3, .smv a, .smv span, .smv button, .smv img, .smv time { float: none !important; }
.smv .smv-head { width: 100% !important; display: flex !important; }

.smv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.smv-title { margin: 0; font-size: 1.15em; line-height: 1.25; }
.smv-more { font-size: .9em; font-weight: 600; text-decoration: none; white-space: nowrap; }
.smv-more:hover { text-decoration: underline; }

.smv-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--smv-gap); grid-template-columns: repeat(var(--smv-cols, 4), minmax(0, 1fr)); }
.smv-item { margin: 0; padding: 0; min-width: 0; }
.smv-item::before { content: none !important; } /* themes that decorate <li> */

/* Narrow boxes (sidebars, phones): two across. */
@container smv (max-width: 520px) {
  .smv-layout-grid .smv-grid { grid-template-columns: repeat(min(2, var(--smv-cols, 4)), minmax(0, 1fr)); gap: 10px; }
}
@container smv (max-width: 220px) {
  .smv-layout-grid .smv-grid { grid-template-columns: minmax(0, 1fr); }
}
/* "mobile_count": hide the extras on phones. */
@media (max-width: 600px) { .smv .smv-desk-only { display: none; } }

/* ---- tile ---- */
.smv-tile {
  all: unset;
  display: flex; flex-direction: column; width: 100%;
  cursor: pointer; border-radius: var(--smv-radius);
  -webkit-tap-highlight-color: transparent;
}
.smv-thumb {
  position: relative; display: block; width: 100%;
  aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--smv-radius);
  background: #11151c; box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
  transition: transform .18s ease, box-shadow .18s ease;
}
.smv-shape-square .smv-thumb { aspect-ratio: 1 / 1; }
.smv-shape-landscape .smv-thumb { aspect-ratio: 16 / 9; }
.smv-shape-auto .smv-tile[style] .smv-thumb { aspect-ratio: inherit; }
.smv-thumb img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; display: block; margin: 0 !important; border: 0 !important; }
.smv-tile:hover .smv-thumb, .smv-tile:focus-visible .smv-thumb { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .24); }
.smv-tile:focus-visible { outline: 3px solid var(--smv-accent); outline-offset: 3px; }

.smv-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
}
.smv-play svg {
  width: 44px; height: 44px; padding: 10px 8px 10px 12px; fill: #fff;
  background: rgba(0, 0, 0, .45); border-radius: 50%;
  transition: transform .18s ease, background .18s ease;
}
.smv-tile:hover .smv-play svg { transform: scale(1.08); background: var(--smv-navy); }
.smv-dur {
  position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* Title sits below the picture (readable on any theme background). */
.smv-cap { display: block; padding: 8px 2px 0; text-align: left; }
.smv-cap-t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .92em; font-weight: 650; line-height: 1.3;
}
.smv-cap-m { display: block; margin-top: 3px; font-size: .78em; color: var(--smv-muted); }

/* ---- compact list layout (sidebars) ---- */
.smv-layout-list .smv-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.smv-layout-list .smv-tile { flex-direction: row; align-items: center; gap: 12px; }
.smv-layout-list .smv-thumb { width: 74px; flex: 0 0 74px; border-radius: 9px; }
.smv-layout-list.smv-shape-landscape .smv-thumb { width: 120px; flex-basis: 120px; }
.smv-layout-list .smv-play svg { width: 28px; height: 28px; padding: 6px 5px 6px 8px; }
.smv-layout-list .smv-dur { top: auto; bottom: 5px; right: 5px; font-size: 10px; padding: 1px 5px; }
.smv-layout-list .smv-cap { padding: 0; flex: 1; min-width: 0; }
.smv-layout-list .smv-cap-t { -webkit-line-clamp: 3; }

/* ---- swipeable row layout ---- */
.smv-layout-row .smv-grid {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--smv-gap);
  padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.smv-layout-row .smv-item { flex: 0 0 calc((100% - 3 * var(--smv-gap)) / 4); scroll-snap-align: start; }
@container smv (max-width: 700px) { .smv-layout-row .smv-item { flex-basis: calc((100% - 2 * var(--smv-gap)) / 2.4); } }
@container smv (max-width: 360px) { .smv-layout-row .smv-item { flex-basis: 62%; } }

/* ---- pager ---- */
.smv-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 14px; flex-wrap: wrap; }
.smv-pg {
  font: inherit; font-weight: 700; font-size: 14px; min-height: 42px; padding: 9px 18px; cursor: pointer;
  border-radius: 999px; border: 1.5px solid var(--smv-navy); background: #fff; color: var(--smv-navy);
}
.smv-pg:hover:not(:disabled) { background: var(--smv-navy); color: #fff; }
.smv-pg:disabled { opacity: .35; cursor: default; }
.smv-pg-lbl { font-size: 13px; color: var(--smv-muted); }
.smv-busy .smv-grid { opacity: .5; transition: opacity .2s; }
.smv-empty { padding: 24px 12px; text-align: center; color: var(--smv-muted); }

/* ---- player ---- */
html.smv-noscroll, html.smv-noscroll body { overflow: hidden !important; }
.smv-lb {
  position: fixed; inset: 0; z-index: 999999; display: none;
  background: rgba(5, 7, 12, .96); color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top top" "prev stage next" "meta meta meta";
}
.smv-lb.open { display: grid; }
.smv-lb-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
.smv-lb-count { font-size: 13px; color: #aab3c0; padding-left: 6px; font-variant-numeric: tabular-nums; }
.smv-lb-actions { display: flex; gap: 8px; }
.smv-lb-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.smv-lb-btn svg { width: 20px; height: 20px; fill: #fff; }
.smv-lb-btn:hover, .smv-lb-btn:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.smv-lb-stage { grid-area: stage; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 4px; }
.smv-lb-video { max-width: 100%; max-height: 100%; height: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 12px; object-fit: contain; }
.smv-lb.smv-landscape .smv-lb-video { height: auto; width: 100%; aspect-ratio: 16 / 9; }
.smv-lb-nav {
  align-self: center; justify-self: center; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 34px; line-height: 1; padding-bottom: 4px;
}
.smv-lb-nav:hover, .smv-lb-nav:focus-visible { background: var(--smv-accent, #ffca41); color: #262d66; outline: none; }
.smv-lb-nav[hidden] { visibility: hidden; display: block; }
.smv-lb-prev { grid-area: prev; } .smv-lb-next { grid-area: next; }
.smv-lb-meta { grid-area: meta; padding: 10px 18px 18px; max-width: 760px; margin: 0 auto; width: 100%; text-align: center; }
.smv-lb-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.smv-lb-sub { font-size: 13px; color: #aab3c0; margin-top: 3px; }
.smv-lb-desc { font-size: 14px; line-height: 1.45; color: #d2d8e0; margin-top: 8px; white-space: pre-wrap; max-height: 5.8em; overflow: auto; }
.smv-lb-more { display: inline-block; margin-top: 10px; color: #ffca41; font-weight: 700; font-size: 14px; text-decoration: none; }
.smv-lb-more[hidden] { display: none; }
.smv-lb-toast {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 8px 14px; border-radius: 8px;
  background: #fff; color: #111; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.smv-lb-toast.show { opacity: 1; }

/* Phones: video fills the screen, arrows tuck over it, swipe does the rest. */
@media (max-width: 640px) {
  .smv-lb { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .smv-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; font-size: 28px; background: rgba(0, 0, 0, .4); z-index: 2; }
  .smv-lb-prev { left: 6px; } .smv-lb-next { right: 6px; }
  .smv-lb-stage { padding: 0; }
  .smv-lb-video { border-radius: 0; }
  .smv-lb-meta { padding: 8px 14px 14px; text-align: left; }
  .smv-lb-title { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .smv-thumb, .smv-play svg { transition: none; }
}

/* 1.1.0: "See more videos" / "Load more videos" buttons under the grid */
.smv .smv-foot { display: flex !important; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; }
.smv .smv-big-btn {
  display: inline-flex !important; align-items: center; gap: 6px; min-height: 46px; padding: 11px 26px; cursor: pointer;
  border: 0; border-radius: 999px; background: var(--smv-navy); color: #fff !important; text-decoration: none !important;
  font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 2px 10px rgba(38, 45, 102, .25); transition: transform .15s ease, box-shadow .15s ease;
}
.smv .smv-big-btn:hover, .smv .smv-big-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(38, 45, 102, .35); }
.smv .smv-big-btn:focus-visible { outline: 3px solid var(--smv-accent); outline-offset: 3px; }
.smv .smv-big-btn:disabled { opacity: .6; cursor: wait; }
.smv .smv-big-btn[hidden] { display: none !important; }
.smv .smv-count { font-size: 12.5px; color: var(--smv-muted); }
.smv-ctx-widget .smv-big-btn { width: 100%; justify-content: center; }
