/* Video Slider CSS */

.video-player-shell {
  width: min(100%, 920px);
  margin-inline: auto;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000;
}

.video-player-wrapper.local-preview::after {
  content: 'Local preview cannot embed YouTube (Error 153). Use Watch on YouTube below.';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.86));
  font-weight: 600;
  line-height: 1.4;
}

#video-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-meta {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.video-title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.video-external-link {
  color: #ddd;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-external-link:hover,
.video-external-link:focus-visible {
  color: #fff;
}

.video-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
  margin-bottom: 1.1rem;
  padding: 0.4rem 0.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.video-nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.video-nav:hover,
.video-nav:focus-visible {
  background: rgba(81, 61, 182, 0.55);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.video-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.2rem 0.25rem;
}

.video-dots::-webkit-scrollbar {
  display: none;
}

.video-dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-dot.active {
  background: #513db6;
  transform: scale(1.2);
}

.video-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .video-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .video-controls {
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    margin-bottom: 1.35rem;
  }

  .video-nav {
    width: 50px;
    height: 50px;
  }

  .video-dot {
    width: 15px;
    height: 15px;
  }
}
