/* ── c102_utilities: video gallery + audio-image gallery ── */

/* ── Item wrappers (title above thumb) ── */

.bv-vidgallery__item,
.bv-audgallery__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.bv-vidgallery__title,
.bv-audgallery__title {
  font-size: 0.82rem;
  color: var(--ink-soft, #555);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* ════════════════════════════════════════════════════════
   1.  VIDEO GALLERY
   ════════════════════════════════════════════════════════ */

.bv-vidgallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.bv-vidgallery__thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  flex-shrink: 0;
  background: #111;
  transition: border-color var(--transition-speed, 0.2s),
              transform     var(--transition-speed, 0.2s);
}

.bv-vidgallery__thumb:hover {
  border-color: var(--gold, #d8b36a);
  transform: scale(1.04);
}

.bv-vidgallery__thumb img,
.bv-vidgallery__thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* semi-transparent overlay with CSS triangle play icon */
.bv-vidgallery__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  transition: background 0.2s;
}

.bv-vidgallery__thumb:hover .bv-vidgallery__play {
  background: rgba(0, 0, 0, 0.48);
}

.bv-vidgallery__play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* ── Video popup overlay ── */

.bv-vidpopup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.bv-vidpopup.is-open {
  display: flex;
}

.bv-vidpopup__frame {
  width: min(92vw, 920px);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.bv-vidpopup__frame iframe,
.bv-vidpopup__frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.bv-vidpopup__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9001;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.bv-vidpopup__close:hover {
  background: rgba(255, 255, 255, 0.30);
}

/* ════════════════════════════════════════════════════════
   2.  AUDIO-IMAGE GALLERY
   ════════════════════════════════════════════════════════ */

.bv-audgallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.bv-audgallery__thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  flex-shrink: 0;
  transition: border-color var(--transition-speed, 0.2s),
              transform     var(--transition-speed, 0.2s);
}

.bv-audgallery__thumb:hover {
  border-color: var(--gold, #d8b36a);
  transform: scale(1.04);
}

.bv-audgallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* music-note badge in the corner */
.bv-audgallery__badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bv-audgallery__badge svg {
  width: 15px;
  height: 15px;
  fill: #fff;
}

/* ── Audio-image lightbox ── */

.bv-audlightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
  box-sizing: border-box;
}

.bv-audlightbox.is-open {
  display: flex;
}

.bv-audlightbox__img {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  display: block;
}

/* audio player bar */
.bv-audlightbox__player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 40px;
  padding: 10px 22px;
  width: min(520px, 90vw);
  box-sizing: border-box;
  flex-wrap: nowrap;
}

.bv-audlightbox__playbtn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.3rem;
  width: 34px;
  height: 34px;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.bv-audlightbox__playbtn:hover {
  opacity: 0.75;
}

.bv-audlightbox__scrubber {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  outline: none;
  cursor: pointer;
}

.bv-audlightbox__scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold, #d8b36a);
  cursor: pointer;
}

.bv-audlightbox__scrubber::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold, #d8b36a);
  cursor: pointer;
  border: none;
}

.bv-audlightbox__time {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  min-width: 76px;
  text-align: right;
  white-space: nowrap;
}

.bv-audlightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9001;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.bv-audlightbox__close:hover {
  background: rgba(255, 255, 255, 0.30);
}
