/*
 * Videos page (/videos/) and single videos: featured spot, kind filter, grid cards, Load more, related videos.
 * Colours are Elementor's global variables only, so the light/dark toggle works.
 * Elementor's kit styles every <button> and link (background, colour, white focus outline); doubled classes
 * (.x.x) win over it without !important, as on the Music page.
 */

/* ---- Featured spot ---- */
.sbx-videos-featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* The sticky header would cover the player after "scroll back up". */
  scroll-margin-top: 96px;
}

.sbx-videos-featured:focus {
  outline: none;
}

.sbx-videos-featured__player {
  margin-bottom: 8px;
}

.sbx-videos-featured__label {
  align-self: flex-start;
  margin: 0;
  padding: 4px 10px;
  border-radius: 2px;
  background: var(--e-global-color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sbx-videos-featured__label[hidden],
.sbx-videos-featured__excerpt[hidden],
.sbx-videos-card[hidden],
.sbx-videos-filters[hidden],
.sbx-videos-more[hidden] {
  display: none;
}

.sbx-videos-featured__title {
  margin: 0;
}

.sbx-videos-featured__title a.sbx-link,
.sbx-videos-featured__title a,
.sbx-videos-card__title a {
  color: var(--e-global-color-text);
  text-decoration: none;
}

.sbx-videos-featured__title a:hover,
.sbx-videos-card__title a:hover {
  color: var(--e-global-color-accent);
}

.sbx-videos-featured__meta,
.sbx-videos-card__meta {
  margin: 0;
  color: var(--e-global-color-muted);
  font-size: 14px;
}

.sbx-videos-featured__excerpt {
  margin: 0;
  max-width: 70ch;
}

.sbx-videos-empty {
  margin: 0;
  color: var(--e-global-color-muted);
}

/* ---- Filter (same look as the Music page's) ---- */
.sbx-videos-list {
  margin-top: 48px;
}

.sbx-videos-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.sbx-videos-filter__btn.sbx-videos-filter__btn {
  padding: 8px 16px;
  border: 1px solid var(--e-global-color-fieldbd);
  border-radius: 20px;
  background: transparent;
  color: var(--e-global-color-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.sbx-videos-filter__btn.sbx-videos-filter__btn:hover {
  border-color: var(--e-global-color-accent);
  color: var(--e-global-color-accent);
  background: transparent;
}

/* The chosen filter: filled with the text colour (inverts in light mode). */
.sbx-videos-filter__btn.sbx-videos-filter__btn[aria-pressed='true'] {
  border-color: var(--e-global-color-text);
  background: var(--e-global-color-text);
  color: var(--e-global-color-secondary);
}

/* ---- Grid ---- */
.sbx-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
}

@media (max-width: 1024px) {
  .sbx-videos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .sbx-videos-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sbx-videos-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sbx-videos-card__play.sbx-videos-card__play {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--e-global-color-surface);
}

.sbx-videos-card__play .sbx-video-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Smaller play circle on cards than on the big player. */
.sbx-videos-card__play .sbx-play-icon {
  width: 52px;
  height: 52px;
}

.sbx-videos-card__play .sbx-play-icon::after {
  border-left-width: 16px;
  border-top-width: 10px;
  border-bottom-width: 10px;
  margin-left: 4px;
}

.sbx-videos-card__play:hover .sbx-play-icon {
  background: #b8151a;
}

/* Card titles take the site's H3 style (Anton, uppercase) from the kit; only the size changes. */
.sbx-videos-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* ---- Load more, Subscribe ---- */
.sbx-videos-more.sbx-videos-more {
  display: block;
  margin: 40px auto 0;
  padding: 12px 28px;
  border: 1px solid var(--e-global-color-fieldbd);
  border-radius: 2px;
  background: transparent;
  color: var(--e-global-color-text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.sbx-videos-more.sbx-videos-more:hover {
  border-color: var(--e-global-color-accent);
  color: var(--e-global-color-accent);
  background: transparent;
}

.sbx-videos-subscribe {
  margin: 48px 0 0;
  text-align: center;
  font-weight: 600;
}

/* ---- Related videos (single video page) ---- */
.sbx-videos-related__title {
  margin: 0 0 24px;
}

/* ---- Focus: the site's 2px Accent ring everywhere ---- */
.sbx-videos-filter__btn.sbx-videos-filter__btn:focus-visible,
.sbx-videos-more.sbx-videos-more:focus-visible,
.sbx-videos-card__play.sbx-videos-card__play:focus-visible,
.sbx-videos-card__title a:focus-visible,
.sbx-videos-featured__title a:focus-visible {
  outline: 2px solid var(--e-global-color-accent);
  outline-offset: 2px;
  box-shadow: none;
}
