/* WalkWise HLS Player — Custom Styling */
.ww-video-wrapper {
  position: relative;
  background: #0D1117;
  border-radius: var(--ww-radius-lg, 16px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

/* Loading overlay */
.ww-video-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(32,48,101,.85); z-index: 10; transition: opacity .3s;
}
.ww-video-loading.is-hidden { opacity: 0; pointer-events: none; }
.ww-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(246,126,58,.3);
  border-top-color: #F67E3A;
  animation: ww-spin 1s linear infinite;
}
@keyframes ww-spin { to { transform: rotate(360deg); } }

/* Video element */
.walkwise-hls-player, .ww-video-wrapper video {
  width: 100%; height: 100%; display: block;
  border-radius: var(--ww-radius-lg, 16px);
}

/* Custom controls bar */
.ww-video-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(32,48,101,.95) 0%, transparent 100%);
  padding: 2rem 1rem .75rem;
  display: flex; align-items: center; gap: .75rem;
  opacity: 0; transition: opacity .3s;
  z-index: 5;
}
.ww-video-wrapper:hover .ww-video-controls,
.ww-video-wrapper:focus-within .ww-video-controls { opacity: 1; }

/* Progress bar */
.ww-video-progress {
  flex: 1; height: 4px; background: rgba(255,255,255,.2);
  border-radius: 2px; cursor: pointer; position: relative;
}
.ww-video-progress__fill {
  height: 100%; background: var(--ww-primary, #F67E3A);
  border-radius: 2px; pointer-events: none;
  transition: width .1s linear;
}
.ww-video-progress:hover { height: 6px; }

/* Control buttons (44px touch target) */
.ww-vid-btn {
  width: 44px; height: 44px; border: none; background: none;
  color: white; cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background .15s;
  flex-shrink: 0;
}
.ww-vid-btn:hover, .ww-vid-btn:focus-visible { background: rgba(255,255,255,.15); outline: 2px solid var(--ww-primary, #F67E3A); }
.ww-vid-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Playback speed selector */
.ww-video-speed {
  background: none; border: 1px solid rgba(255,255,255,.3);
  color: white; font-size: .75rem; font-weight: 700;
  padding: .25rem .5rem; border-radius: 4px; cursor: pointer;
}
.ww-video-speed:hover { border-color: var(--ww-primary, #F67E3A); color: var(--ww-primary, #F67E3A); }

/* Time display */
.ww-video-time { color: rgba(255,255,255,.8); font-size: .75rem; white-space: nowrap; }

/* Error state */
.ww-video-error {
  display: none; position: absolute; inset: 0;
  background: rgba(32,48,101,.9); color: white;
  align-items: center; justify-content: center; flex-direction: column;
  gap: 1rem; text-align: center; padding: 2rem;
}
.ww-video-error.is-visible { display: flex; }
.ww-video-error__icon { font-size: 3rem; }
.ww-video-error__message { font-size: .875rem; opacity: .8; }

/* Fullscreen */
.ww-video-wrapper:fullscreen, .ww-video-wrapper:-webkit-full-screen { border-radius: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ww-spinner { animation: none; border-top-color: var(--ww-primary); }
  .ww-video-controls { opacity: 1; }
}
