/* Testing Videos: styles are scoped to this section and its player. */
.testing-videos-section {
  background: var(--black, #080a0c);
  scroll-margin-top: 100px;
}

.testing-videos-section .section-heading {
  margin-bottom: 28px;
}

.testing-video-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.testing-video-filter {
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  background: transparent;
  color: var(--white, #f6f4ee);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}

.testing-video-filter:hover {
  border-color: var(--gold, #c5a15a);
}

.testing-video-filter[aria-pressed="true"] {
  border-color: var(--gold, #c5a15a);
  background: var(--gold, #c5a15a);
  color: var(--black, #080a0c);
}

.testing-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.testing-video-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  background: var(--panel, #14191e);
}

.testing-video-card[hidden],
.testing-video-error[hidden],
.testing-video-pagination[hidden] {
  display: none;
}

.testing-video-card:hover {
  border-color: var(--gold, #c5a15a);
}

.testing-video-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.testing-video-poster {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
}

.testing-video-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.testing-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: rgba(8, 10, 12, .78);
  color: #fff;
  transform: translate(-50%, -50%);
}

.testing-video-play svg {
  width: 25px;
  height: 25px;
  margin-left: 3px;
}

.testing-video-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  background: rgba(8, 10, 12, .9);
  color: #fff;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.testing-video-info {
  padding: 18px;
}

.testing-video-category {
  margin: 0 0 8px;
  color: var(--gold-light, #e4c376);
  font-size: .875rem;
  font-weight: 700;
}

.testing-video-info h3 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.testing-video-filter:focus-visible,
.testing-video-page-button:focus-visible,
.testing-video-link:focus-visible,
.testing-video-close:focus-visible,
.testing-video-error a:focus-visible {
  outline: 3px solid var(--gold-light, #e4c376);
  outline-offset: -3px;
}

.testing-video-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.testing-video-pagination,
.testing-video-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.testing-video-pagination {
  margin-top: 32px;
}

.testing-video-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  background: transparent;
  color: var(--white, #f6f4ee);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.testing-video-page-button:hover:not(:disabled) {
  border-color: var(--gold, #c5a15a);
}

.testing-video-page-button[aria-current="page"] {
  border-color: var(--gold, #c5a15a);
  background: var(--gold, #c5a15a);
  color: var(--black, #080a0c);
}

.testing-video-page-button:disabled {
  opacity: .35;
  cursor: default;
}

.testing-video-page-summary {
  margin: 14px 0 0;
  color: var(--muted, #9ba2a9);
  font-size: .875rem;
  text-align: center;
}

body.testing-video-open {
  overflow: hidden;
}

.testing-video-dialog {
  width: 440px;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--gold, #c5a15a);
  background: var(--black-2, #0d1013);
  color: var(--white, #f6f4ee);
}

.testing-video-dialog:not([open]) {
  display: none;
}

.testing-video-dialog::backdrop {
  background: rgba(0, 0, 0, .88);
}

.testing-video-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.testing-video-dialog-header h2 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: normal;
}

.testing-video-dialog-header .testing-video-category {
  margin-bottom: 4px;
}

.testing-video-close {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  background: var(--panel, #14191e);
  color: var(--white, #f6f4ee);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.testing-video-close:hover {
  border-color: var(--gold, #c5a15a);
}

.testing-video-player {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 180px);
  max-height: calc(100dvh - 180px);
  aspect-ratio: 9 / 16;
  background: #000;
  object-fit: contain;
}

.testing-video-error {
  margin: 14px 0 0;
  font-size: 1rem;
}

.testing-video-error a {
  color: var(--gold-light, #e4c376);
  text-decoration: underline;
}

@media (max-width: 1000px) {
  .testing-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .testing-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .testing-video-info {
    padding: 14px;
  }

  .testing-video-info h3 {
    font-size: 1rem;
  }

  .testing-video-filter {
    padding: 10px 12px;
  }

  .testing-video-play {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 380px) {
  .testing-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
