.fv-rows-hub,
.fvr-hub {
  width: 100%;
}

.fvr-account-bar {
  font-size: 0.85rem;
  color: #666;
  margin: -18px 0 20px;
}

.fvr-account-bar a {
  color: inherit;
}

/* ---- Paywall popup — small and compact by design (a quick email prompt,
   not a full checkout form: card entry happens on Stripe's own page). ---- */

.fvr-paywall-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Max out z-index rather than guessing a number higher than the theme's
     header/footer — this is also moved to a direct child of <body> in JS,
     which is what actually fixes iOS Safari sliding it under a fixed
     header/footer (that happens when position:fixed is trapped inside a
     `transform`d ancestor, which the z-index alone can't fix). */
  z-index: 2147483647;
  padding: 20px;
}

.fvr-paywall-overlay[hidden] {
  display: none;
}

/* Set on <body> while the popup is open, so the page can't scroll behind it
   (that scrolling is what makes a fixed popup look like it's sliding around
   on iOS). */
body.fvr-paywall-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.fvr-paywall-modal {
  background: #fff;
  color: #111;
  border-radius: 14px;
  padding: 28px 26px;
  max-width: 340px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.fvr-paywall-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: #888;
  padding: 4px;
}

.fvr-paywall-close:hover {
  color: #111;
}

.fvr-paywall-modal h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.fvr-paywall-price {
  font-weight: 600;
  color: #e0602a;
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.fvr-paywall-modal p {
  font-size: 0.85rem;
  color: #444;
  margin: 0 0 12px;
  line-height: 1.4;
}

.fvr-paywall-modal input[type="email"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.fvr-paywall-join-btn,
.fvr-paywall-signin-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.fvr-paywall-join-btn:hover,
.fvr-paywall-signin-btn:hover {
  background: #333;
}

.fvr-paywall-join-btn:disabled,
.fvr-paywall-signin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.fvr-paywall-error {
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 10px;
}

.fvr-paywall-signin-msg {
  color: #2c7a2c;
  font-size: 0.8rem;
  margin-top: 10px;
}

.fvr-paywall-switch {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}

.fvr-paywall-switch button {
  border: none;
  background: none;
  color: #0a58ca;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
}

.fvr-hub-title {
  margin-bottom: 16px;
}

.fvr-player-wrap {
  width: 100%;
  margin-bottom: 28px;
  background: #000;
  position: relative;
}

.fvr-player {
  width: 100%;
  max-height: 70vh;
  display: block;
}

/* Auto-hide: while playing and idle, the nav/chapters/speed buttons fade
   out along with the native video controls, and reappear on hover/tap. */
.fvr-player-wrap.fvr-controls-hidden .fvr-nav,
.fvr-player-wrap.fvr-controls-hidden .fvr-chapters-toggle,
.fvr-player-wrap.fvr-controls-hidden .fvr-speed-toggle {
  opacity: 0;
  pointer-events: none;
}

.fvr-nav,
.fvr-chapters-toggle,
.fvr-speed-toggle {
  transition: opacity 0.25s ease;
}

.fvr-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fvr-nav:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.8);
}

.fvr-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.fvr-nav-prev {
  left: 12px;
}

.fvr-nav-next {
  right: 12px;
}

@media (max-width: 480px) {
  .fvr-nav {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
}

.fvr-chapters-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.fvr-chapters-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
}

.fvr-chapters-toggle[hidden] {
  display: none;
}

.fvr-speed-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.fvr-speed-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
}

.fvr-chapters {
  position: absolute;
  top: 56px;
  left: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(2px);
}

.fvr-chapters[hidden] {
  display: none;
}

.fvr-chapter-row {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 5px;
}

.fvr-chapter-row:hover {
  background: rgba(255, 255, 255, 0.12);
}

.fvr-chapter {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: left;
  color: #eee;
  flex: 1;
  min-width: 0;
}

.fvr-chapter-loop {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-right: 4px;
  border: none;
  background: transparent;
  border-radius: 5px;
  color: #999;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fvr-chapter-loop:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.fvr-chapter-loop.fvr-chapter-loop-active {
  color: #4da6ff;
}

.fvr-chapter-time {
  font-variant-numeric: tabular-nums;
  color: #aaa;
  flex-shrink: 0;
}

.fvr-chapter.fvr-chapter-active {
  background: #fff;
}

.fvr-chapter.fvr-chapter-active .fvr-chapter-time,
.fvr-chapter.fvr-chapter-active .fvr-chapter-label {
  color: #111;
}

.fvr-item {
  cursor: pointer;
  outline: none;
  position: relative;
}

.fvr-item-locked img {
  filter: brightness(0.55);
}

.fvr-lock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.fvr-item img {
  display: block;
  width: 100%;
  border-radius: 4px;
  border: 2px solid transparent;
}

.fvr-item-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none; /* clicks/hover always reach the thumbnail underneath, never the preview clip itself */
}

.fvr-item:hover img,
.fvr-item:focus img {
  border-color: #666;
}

.fvr-item-playing img {
  border-color: #e33;
}

.fvr-item-title {
  margin-top: 6px;
  font-size: 0.9rem;
}

.fvr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.fvr-tab-btn {
  padding: 8px 18px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}

.fvr-tab-btn:hover {
  border-color: #888;
}

.fvr-tab-btn.fvr-tab-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.fvr-tab-panel {
  display: none;
}

.fvr-tab-panel.fvr-tab-panel-active {
  display: block;
}

.fv-rows-row {
  margin-bottom: 28px;
}

.fv-rows-row-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.fv-rows-row-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.fv-rows-row-track::-webkit-scrollbar {
  height: 8px;
}
.fv-rows-row-track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* Keep each moved FV Player thumbnail at a sensible fixed width in its row
   instead of whatever width the original flat layout gave it. */
.fv-rows-row-track > * {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

@media (max-width: 480px) {
  .fv-rows-row-track > * {
    flex-basis: 150px;
  }
}
