/* Reels Player widget. Reuses the theme's own CSS custom properties
   (--bg-2/--ink/--accent/--line/--ease/--r-card, defined in the theme's
   main.css :root) so it stays in sync with the site's design tokens. */

.ab-reels { display: flex; justify-content: center; }

.reels-frame {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 9 / 16;
  border-radius: var(--r-card, 20px);
  overflow: hidden;
  background: var(--bg-2, #131315);
  outline: none;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.reels-frame:focus-visible { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 4px; }

.reels-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

.reels-progress { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.reels-progress .seg { flex: 1 1 0; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.reels-progress .fill { display: block; height: 100%; background: #fff; width: 0%; }

.reels-mute {
  position: absolute; top: 24px; right: 12px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(11,11,12,.55); backdrop-filter: blur(4px);
  border: 1px solid rgba(245,244,241,.18); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.reels-mute svg { display: block; }

.reels-counter {
  position: absolute; bottom: 14px; left: 14px; z-index: 3;
  font-size: 11.2px; letter-spacing: .06em; color: rgba(255,255,255,.78);
  font-variant-numeric: tabular-nums; font-family: "Onest", system-ui, sans-serif;
}

.reels-zone {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(11,11,12,.45); border: 1px solid rgba(245,244,241,.15); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity .25s var(--ease, ease);
}
.reels-zone.prev { left: 10px; }
.reels-zone.next { right: 10px; }
.reels-frame:hover .reels-zone,
.reels-frame:focus-visible .reels-zone { opacity: 1; }
.reels-zone:disabled { opacity: 0 !important; pointer-events: none; }

.reels-tap { position: absolute; top: 0; bottom: 0; z-index: 2; background: transparent; border: 0; padding: 0; cursor: pointer; }
.reels-tap.prev { left: 0; width: 25%; }
.reels-tap.next { right: 0; width: 25%; }
.reels-tap.toggle { left: 25%; width: 50%; }

.reels-hint {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  z-index: 4; display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(11,11,12,.55); backdrop-filter: blur(4px);
  border: 1px solid rgba(245,244,241,.18); color: #fff;
  font-size: 11.2px; letter-spacing: .04em; white-space: nowrap;
  font-family: "Onest", system-ui, sans-serif;
  pointer-events: none;
  animation: reels-hint-bob 1.6s ease-in-out infinite;
  transition: opacity .4s var(--ease, ease), visibility .4s;
}
.reels-hint svg { flex: none; animation: reels-hint-arrow 1.6s ease-in-out infinite; }
.reels-hint svg:last-child { animation-delay: .15s; }
.reels-hint.is-hidden { opacity: 0; visibility: hidden; }

@keyframes reels-hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
@keyframes reels-hint-arrow {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .reels-hint, .reels-hint svg { animation: none; }
}

@media (max-width: 480px) {
  .reels-frame { width: 100%; border-radius: 16px; }
}
