.growfund-video-container {
  position: relative;
  width: 100%;
  background-color: var(--growfund-bg-inverse);
  border-radius: var(--growfund-radius-lg);
  overflow: hidden;
}

.growfund-video {
  width: 100%;
  aspect-ratio: var(--growfund-video-aspect-ratio);
  display: block;
  border-radius: var(--growfund-radius-lg);
  object-fit: cover;
}

.growfund-video-hidden {
  display: none;
}

/* YouTube and Vimeo iframes */
.growfund-video-container iframe {
  width: 100%;
  aspect-ratio: var(--growfund-video-aspect-ratio);
  display: block;
  border-radius: var(--growfund-radius-lg);
  border: none;
}

/* YouTube iframe specific styles for better accessibility */
.growfund-youtube-iframe {
  /* Ensure proper focus indicators */
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.growfund-youtube-iframe:focus {
  outline: 2px solid var(--growfund-primary-color, #007cba);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  /* Play Button Overlay */
  .growfund-video-play-overlay {
    transition: none;
  }

  .growfund-video-play-btn {
    transition: none;
  }

  .growfund-video-play-btn:hover {
    transform: none;
  }

  .growfund-video-play-btn:active {
    transform: none;
  }
}

.growfund-video-container .growfund-video-thumb {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.growfund-video-container .growfund-video-thumb img {
  object-fit: fill;
  display: block;
  aspect-ratio: var(--growfund-aspect-ratio-16-9);
  border-radius: var(--growfund-radius-sm, 8px);
  background-color: var(--growfund-video-thumb-shadow);
}

.growfund-video-container.playing .growfund-video-thumb,
.growfund-video-container.playing .growfund-video-play-overlay {
  opacity: 0;
  pointer-events: none;
}
.growfund-video-container .growfund-video-thumb.hidden {
  display: none;
  pointer-events: none;
}

.growfund-video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.growfund-video-play-overlay:hover {
  background: rgba(0, 0, 0, 0.5);
}

.growfund-video-play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

/* Play Button */
.growfund-video-play-btn {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.growfund-video-play-btn:hover {
  transform: scale(1.1);
}

.growfund-video-play-btn:active {
  transform: scale(0.95);
}

/* Play Icon */
.growfund-video-play-icon {
  display: block;
  flex-shrink: 0;
}

.growfund-video-play-btn .growfund-video-play-icon {
  width: 64px;
  height: 64px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .growfund-video-play-btn .growfund-video-play-icon {
    width: 60px !important;
    height: 60px !important;
  }
}

@media (max-width: 480px) {
  /* Loading State */
  .growfund-video-play-btn .growfund-video-play-icon {
    width: 50px !important;
    height: 50px !important;
  }
}

.growfund-video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--growfund-text-surface);
  font-size: var(--growfund-font-size-md);
  z-index: 5;
}
