/**
 * Short Videos Plugin Styles - TV9 Hindi Style
 */

/* Reset and Base Styles */
.short-videos-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

.short-videos-container * {
  box-sizing: border-box;
}

/* Swiper Container */
.short-videos-swiper {
  width: 100%;
  height: 100%;
  max-width: 500px; /* TV9 Hindi style - more compact */
  margin: 0 auto;
}

.short-videos-swiper .swiper-wrapper {
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.short-videos-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  overflow: hidden;
  position: relative;
}

/* Video Container - TV9 Hindi Style */
.sv-video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  max-width: 500px;
  margin: 0 auto;
  background: #000;
  border-radius: 0;
  overflow: hidden;
}

/* Video Players */
.sv-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  outline: none;
  background: #000;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.sv-video-player:hover {
  filter: brightness(1.1);
}

.sv-youtube-player {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
}

.sv-mp4-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
 
/* Video Overlay - TV9 Hindi Style */
.sv-video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  /*right: 70px;  More space for controls */
  padding: 20px 15px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  z-index: 10;
  pointer-events: none;
  width:100%;
}

.sv-video-info {
  color: white;
}

.sv-video-headline {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  line-height: 1.3;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 25px;
}

.sv-video-title {
  font-size: 13px;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.4;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sv-video-stats {
  font-size: 11px;
  opacity: 0.8;
  display: flex;
  gap: 10px;
  align-items: center;
}

.sv-views {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
}

/* Video Controls -  */
.sv-video-controls {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.sv-video-controls.visible {
  opacity: 1;
}

.sv-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  position: relative;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sv-control-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sv-control-btn:active {
  transform: scale(0.95);
}

.sv-control-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.sv-control-btn:disabled,
.sv-control-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.sv-control-btn svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
  flex-shrink: 0;
}

/* Specific Button Styles */
.sv-nav-up,
.sv-nav-down {
  background: rgba(255, 255, 255, 0.1);
}

.sv-home-btn {
  background: rgba(0, 123, 255, 0.8);
}

.sv-home-btn:hover {
  background: rgba(0, 123, 255, 1);
}

.sv-mute-btn .sv-volume-off {
  display: none;
}

.sv-mute-btn.muted .sv-volume-on {
  display: none;
}

.sv-mute-btn.muted .sv-volume-off {
  display: block;
}

.sv-mute-btn.muted {
  background: rgba(255, 193, 7, 0.8);
}

.sv-like-btn.liked {
  background: rgba(255, 20, 147, 0.9);
  color: #fff;
  animation: sv-likeAnimation 0.3s ease;
}

.sv-like-btn.liked svg {
  fill: currentColor;
}

@keyframes sv-likeAnimation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.sv-whatsapp-share {
  background: rgba(37, 211, 102, 0.8);
}

.sv-whatsapp-share:hover {
  background: rgba(37, 211, 102, 1);
}

.sv-share-btn {
  background: rgba(29, 161, 242, 0.8);
}

.sv-share-btn:hover {
  background: rgba(29, 161, 242, 1);
}

/* Loading States */
.sv-video-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #000;
  color: white;
}

.sv-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: sv-spin 1s linear infinite;
}

@keyframes sv-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  .short-videos-swiper {
    max-width: 100%;
  }

  .sv-video-container {
    max-width: 100%;
  }

  .sv-video-controls {
    right: 8px;
    gap: 10px;
  }

  .sv-control-btn {
    width: 40px;
    height: 40px;
  }

  .sv-control-btn svg {
    width: 18px;
    height: 18px;
  }

  .sv-video-overlay {
    right: 60px;
    padding: 15px 12px;
  }

  .sv-video-headline {
    font-size: 15px;
  }

  .sv-video-title {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .sv-video-controls {
    right: 6px;
    gap: 8px;
  }

  .sv-control-btn {
    width: 38px;
    height: 38px;
  }

  .sv-control-btn svg {
    width: 16px;
    height: 16px;
  }

  .sv-video-overlay {
    right: 55px;
    padding: 12px 10px;
    width:100%;
    height: 25%;
  }

  .sv-video-headline {
    font-size: 14px;
  }

  .sv-video-title {
    font-size: 11px;
  }
}

/* Desktop Styles */
@media (min-width: 769px) {
  .short-videos-container {
    background: #111;
  }

  .short-videos-swiper {
    max-width: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }

  .sv-video-container {
    border-radius: 12px;
  }

  .sv-video-controls {
    right: 16px;
  }
}

/* Notification Styles */
.sv-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  z-index: 9999;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  animation: sv-slideIn 0.3s ease-out;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes sv-slideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Hide scrollbars */
.short-videos-container::-webkit-scrollbar {
  display: none;
}

.short-videos-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
  overflow: hidden;
}

/* Accessibility */
.sv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .sv-control-btn {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid white;
  }

  .sv-video-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.98));
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .sv-control-btn {
    transition: none;
  }

  .sv-control-btn:hover {
    transform: none;
  }

  .sv-loading-spinner {
    animation: none;
  }

  .sv-video-player {
    transition: none;
  }
}

/* Fullscreen Single Video Template */
.sv-fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 999999;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.short-video-single {
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #000 !important;
}

.short-video-single #wpadminbar {
  display: none !important;
}

.short-video-single html {
  margin-top: 0 !important;
}

body.short-video-single {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Heart animation */
.sv-heart-animation {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  color: #ff1493;
  z-index: 1000;
  pointer-events: none;
}

/* Play/Pause indicator */
.sv-play-indicator {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: rgba(255, 255, 255, 0.9);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sv-play-indicator.show {
  opacity: 1;
}
