/**
 * Video Player Styles - Glassmorphic Design
 */

.video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16; /* Instagram reel format */
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.video-player:hover {
  transform: scale(1.02);
}

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

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* Info Panel (Top, Hover-Reveal) */
.info-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-panel.visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2px;
}

.brand-description {
  font-size: 9px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

/* Controls (Bottom, Always Visible) */
.controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  pointer-events: auto;
}

.controls-inner {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Play Button */
.play-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  pointer-events: auto;
  font-size: 12px;
}

.play-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.play-btn i {
  margin-left: 2px; /* Center play icon visually */
}

.play-btn:has(.fa-pause) i {
  margin-left: 0;
}

/* Progress Bar */
.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 2px;
}

.progress-bar:hover .progress-fill {
  background: #00ff88; /* Accent color on hover */
}

/* Volume Button */
.volume-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 14px;
  pointer-events: auto;
  padding: 4px;
  transition: color 0.2s ease;
}

.volume-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Fallback UI */
.video-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.fallback-content {
  text-align: center;
}

.fallback-logo {
  font-size: 48px;
  color: #666;
  margin-bottom: 16px;
}

.fallback-link {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 14px;
}

.fallback-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile/Touch Optimizations */
@media (max-width: 768px) {
  .play-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 14px;
  }

  .brand-name {
    font-size: 12px;
  }

  .brand-description {
    font-size: 10px;
  }

  .video-player:hover {
    transform: none; /* Disable hover scale on mobile */
  }
}

/* Google Drive Embed */
.drive-embed {
  display: flex;
  flex-direction: column;
  aspect-ratio: unset;
  height: auto;
}

.drive-embed iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: none;
  display: block;
  border-radius: 8px 8px 0 0;
}

.drive-brand-label {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drive-brand-label .brand-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.drive-brand-label .brand-description {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
}

/* Accessibility */
.video-player:focus-visible {
  outline: 2px solid #00ff88;
  outline-offset: 2px;
}

button:focus-visible {
  outline: 2px solid #00ff88;
  outline-offset: 2px;
}
