/* Custom Steam trailer player — dark bar UI (no orange, no heavy blur) */

.steamstore-trailer-slide .kb-gal-image-radius,
.steamstore-trailer-slide .kb-gallery-image-contain {
  position: relative;
}

.steamstore-trailer-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  background: #000;
  border-radius: inherit;
  overflow: hidden;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.steamstore-trailer-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}

.steamstore-trailer-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.steamstore-trailer-ui > * {
  pointer-events: auto;
}

/* Big play — light, no blur overlay on thumbnail */
.steamstore-trailer-bigplay,
.steamstore-trailer-bigplay:hover,
.steamstore-trailer-bigplay:focus,
.steamstore-trailer-bigplay:active {
  all: unset;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent !important;
  box-shadow: none !important;
}

.steamstore-trailer-bigplay.is-hidden {
  display: none !important;
}

.steamstore-trailer-bigplay__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.92);
  transition: transform 0.15s ease, background 0.15s ease;
}

.steamstore-trailer-bigplay__icon svg {
  width: 1.6rem;
  height: 1.6rem;
  margin-left: 0.15rem;
}

.steamstore-trailer-bigplay:hover .steamstore-trailer-bigplay__icon,
.steamstore-trailer-bigplay:focus-visible .steamstore-trailer-bigplay__icon {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.72);
}

/* Bottom control bar */
.steamstore-trailer-bar {
  position: relative;
  padding: 0 0.55rem 0.35rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.92) 100%);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.steamstore-trailer-wrap.is-playing:not(:hover):not(:focus-within) .steamstore-trailer-bar {
  opacity: 0;
  pointer-events: none;
}

.steamstore-trailer-progress {
  position: relative;
  height: 1.1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.steamstore-trailer-progress__track {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.steamstore-trailer-progress__buff {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(255, 255, 255, 0.35);
}

.steamstore-trailer-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #47bfff;
}

.steamstore-trailer-progress__fill::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 3px;
  height: 12px;
  transform: translateY(-50%);
  background: #9bdcff;
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(71, 191, 255, 0.7);
}

.steamstore-trailer-progress__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  accent-color: #47bfff;
}

.steamstore-trailer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.25rem;
}

.steamstore-trailer-controls__left,
.steamstore-trailer-controls__right {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.steamstore-trailer-btn,
.steamstore-trailer-btn:hover,
.steamstore-trailer-btn:focus,
.steamstore-trailer-btn:active {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #fff !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.92;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.steamstore-trailer-btn:hover,
.steamstore-trailer-btn:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1) !important;
}

.steamstore-trailer-btn svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.steamstore-trailer-time {
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  user-select: none;
}

.steamstore-trailer-settings {
  position: relative;
}

.steamstore-trailer-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  min-width: 7.5rem;
  padding: 0.35rem;
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.steamstore-trailer-menu__item,
.steamstore-trailer-menu__item:hover,
.steamstore-trailer-menu__item:focus {
  all: unset;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  color: #fff !important;
  font-size: 0.78rem;
  cursor: pointer;
  background: transparent !important;
}

.steamstore-trailer-menu__item:hover,
.steamstore-trailer-menu__item:focus-visible {
  background: rgba(71, 191, 255, 0.16) !important;
}

.steamstore-trailer-menu__item.is-active {
  color: #9bdcff !important;
}

.steamstore-trailer-wrap.is-fullscreen {
  border-radius: 0;
}

/* Thumb nav slide — keep clear image + small play chip */
.steamstore-trailer-thumb {
  position: relative;
}

.steamstore-trailer-thumb .steamstore-trailer-thumb-badge {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  z-index: 2;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(71, 191, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.steamstore-trailer-thumb .steamstore-trailer-thumb-badge svg {
  width: 0.7rem;
  height: 0.7rem;
  margin-left: 0.08rem;
}

.steamstore-trailer-thumb.is-active .steamstore-trailer-thumb-badge,
.steamstore-trailer-thumb.splide__slide--active .steamstore-trailer-thumb-badge {
  border-color: #9bdcff;
  box-shadow: 0 0 10px rgba(71, 191, 255, 0.45);
}

/* Active thumb frame — uses Splide/Kadence .is-active (no JS track hacks). */
.wp-block-kadence-advancedgallery [id^="kb-thumb-slider-"] .splide__slide,
.wp-block-kadence-advancedgallery .splide--nav > .splide__track > .splide__list > .splide__slide {
  box-sizing: border-box !important;
  border: 0 !important;
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

.wp-block-kadence-advancedgallery [id^="kb-thumb-slider-"] .splide__slide.is-active,
.wp-block-kadence-advancedgallery .splide--nav > .splide__track > .splide__list > .splide__slide.is-active {
  opacity: 1 !important;
}

.wp-block-kadence-advancedgallery [id^="kb-thumb-slider-"] .kadence-blocks-gallery-thumb-item,
.wp-block-kadence-advancedgallery [id^="kb-thumb-slider-"] .kadence-blocks-gallery-item {
  position: relative;
}

.wp-block-kadence-advancedgallery [id^="kb-thumb-slider-"] .splide__slide.is-active .kadence-blocks-gallery-thumb-item::after,
.wp-block-kadence-advancedgallery [id^="kb-thumb-slider-"] .splide__slide.is-active .kadence-blocks-gallery-item::after,
.wp-block-kadence-advancedgallery .splide--nav > .splide__track > .splide__list > .splide__slide.is-active .kadence-blocks-gallery-thumb-item::after,
.wp-block-kadence-advancedgallery .splide--nav > .splide__track > .splide__list > .splide__slide.is-active .kadence-blocks-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  box-sizing: border-box;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #47bfff;
}

.steamstore-trailer-slide .kadence-blocks-gallery-item__caption {
  display: none !important;
}

.steamstore-trailer-slide:hover .kb-gal-image-radius,
.steamstore-trailer-slide .kb-gal-image-radius {
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .steamstore-trailer-bigplay__icon {
    width: 3.25rem;
    height: 3.25rem;
  }

  .steamstore-trailer-time {
    font-size: 0.7rem;
  }

  .steamstore-trailer-btn {
    width: 2rem;
    height: 2rem;
  }
}
