/**
 * Vimeo Video Center Embed Styles
 * Responsive, accessible video gallery with hero player
 */

/* Container */
#vimeo-center {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

/* Hero Section */
.vc-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.vc-poster-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.vc-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vc-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.vc-play:hover,
.vc-play:focus {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
  outline: none;
}

.vc-play:focus-visible {
  outline: 3px solid #00adef;
  outline-offset: 4px;
  border-radius: 50%;
}

.vc-player-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#vc-player {
  width: 100%;
  height: 100%;
}

/* Video Info */
.vc-info {
  margin-bottom: 2rem;
}

.vc-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.vc-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
  margin: 0 0 1rem 0;
}

.vc-description a {
  color: #00adef;
  text-decoration: underline;
  word-break: break-word;
}

.vc-description a:hover {
  color: #0090cc;
}

.vc-share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  margin-top: 0.5rem;
}

.vc-share-btn:hover:not(:disabled) {
  background-color: #e5e5e5;
  border-color: #ccc;
}

.vc-share-btn:focus-visible {
  outline: 3px solid #00adef;
  outline-offset: 2px;
}

.vc-share-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.vc-share-btn svg {
  flex-shrink: 0;
}

/* Gallery Grid */
.vc-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .vc-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .vc-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Thumbnail */
.vc-thumbnail {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.vc-thumbnail:hover,
.vc-thumbnail:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  outline: none;
}

.vc-thumbnail:focus-visible {
  outline: 3px solid #00adef;
  outline-offset: 2px;
}

.vc-thumbnail.vc-active {
  box-shadow: 0 0 0 3px #00adef;
}

.vc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vc-thumb-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Pagination */
.vc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.vc-pagination-top {
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.vc-page-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background-color: #00adef;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.vc-page-btn:hover:not(:disabled) {
  background-color: #0090cc;
}

.vc-page-btn:focus-visible {
  outline: 3px solid #00adef;
  outline-offset: 2px;
}

.vc-page-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.vc-page-btn svg {
  flex-shrink: 0;
}

.vc-page-info {
  font-size: 0.9375rem;
  color: #666;
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

/* Loading State */
.vc-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 1rem;
}

/* Empty State */
.vc-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* Error State */
.vc-error {
  text-align: center;
  padding: 3rem 1rem;
  color: #d32f2f;
  font-size: 1rem;
  background-color: #ffebee;
  border-radius: 8px;
  margin: 1rem 0;
}

.vc-error p {
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 639px) {
  .vc-title {
    font-size: 1.375rem;
  }

  .vc-info {
    margin-bottom: 1.5rem;
  }

  .vc-gallery {
    gap: 0.75rem;
  }

  .vc-page-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .vc-page-info {
    font-size: 0.875rem;
    min-width: 90px;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .vc-play,
  .vc-thumbnail {
    transition: none;
  }
}

/* Print styles */
@media print {
  .vc-play,
  .vc-pagination {
    display: none;
  }

  .vc-thumbnail {
    break-inside: avoid;
  }
}
