/* Demo Section Fullscreen Styles */

/* Fullscreen video container */
.demo-video {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.demo-video:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(163, 230, 53, 0.15);
}

/* Video element styles */
.demo-video video {
  width: 100%;
  height: auto;
  min-height: 300px;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

/* Fullscreen video styles for all browsers */
.demo-video video:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain !important;
  background: #000 !important;
  border-radius: 0 !important;
  min-height: auto !important;
}

.demo-video video:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain !important;
  background: #000 !important;
  border-radius: 0 !important;
  min-height: auto !important;
}

.demo-video video:-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain !important;
  background: #000 !important;
  border-radius: 0 !important;
  min-height: auto !important;
}

.demo-video video:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain !important;
  background: #000 !important;
  border-radius: 0 !important;
  min-height: auto !important;
}

/* Tap to expand overlay */
.tap-to-expand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 52, 48, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.demo-video:hover .tap-to-expand {
  opacity: 1;
}

.demo-video.expanded .tap-to-expand {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

/* Control buttons */
.minimize-button {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 52, 48, 0.95);
  color: #a3e635;
  border: 2px solid #a3e635;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  opacity: 1;
  transform: scale(1);
}

.minimize-button:hover {
  background: rgba(163, 230, 53, 0.2);
  transform: scale(1.05);
}

.play-pause-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 52, 48, 0.95);
  color: #a3e635;
  border: 2px solid #a3e635;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 1;
  pointer-events: auto;
}

.play-pause-button:hover {
  background: rgba(163, 230, 53, 0.2);
  transform: translate(-50%, -50%) scale(1.1);
}

.demo-video.expanded .play-pause-button {
  opacity: 1;
  pointer-events: auto;
}

/* Video fallback */
.video-fallback {
  background: linear-gradient(135deg, #001612 0%, #0f3430 100%);
  border: 1px solid rgba(163,230,53,0.15);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #a3e635;
  font-weight: 600;
}

/* Mobile responsive styles */
@media (max-width: 767.98px) {
  .demo-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
  }
  
  .demo-video video {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    object-fit: cover !important;
    border-radius: 0.5rem !important;
  }
  
  .video-fallback {
    width: 100% !important;
    height: 250px !important;
    min-height: 250px !important;
  }
  
  /* Mobile landscape specific */
  @media (max-width: 767.98px) and (orientation: landscape) {
    .demo-video {
      min-height: 200px !important;
    }
    
    .demo-video video {
      min-height: 200px !important;
    }
    
    .video-fallback {
      height: 200px !important;
      min-height: 200px !important;
    }
  }
}

/* Ensure fullscreen works properly on iOS Safari */
@supports (-webkit-touch-callout: none) {
  .demo-video video:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
    background: #000 !important;
    border-radius: 0 !important;
    min-height: auto !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 999999 !important;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .demo-video video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
