/* ==========================================================================
   EZTestimonials Pro - Core Public Stylesheet
   ========================================================================== */

/* Variables (Overwritten dynamically by Customizer settings) */
:root {
  --ez-primary: #6366f1;
  --ez-primary-rgb: 99, 102, 241;
  --ez-radius: 12px;
  --ez-font: 'Outfit', sans-serif;
  --ez-transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --ez-bg-light: #ffffff;
  --ez-bg-dark: #121318;
  --ez-border-light: rgba(0, 0, 0, 0.08);
  --ez-border-dark: rgba(255, 255, 255, 0.08);
  --ez-shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  --ez-shadow-glowing: 0 20px 40px -15px rgba(var(--ez-primary-rgb), 0.25);
}

/* Base Styles */
.ez-wrapper {
  font-family: var(--ez-font);
  width: 100%;
  box-sizing: border-box;
}

.ez-wrapper * {
  box-sizing: border-box;
}

/* Star Rating System */
.ez-stars {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 12px;
}

.ez-star {
  color: #ffb800;
  width: 18px;
  height: 18px;
  display: inline-block;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ez-stars:hover .ez-star {
  animation: ezStarPulse 0.4s ease forwards;
}

.ez-stars:hover .ez-star:nth-child(2) { animation-delay: 0.05s; }
.ez-stars:hover .ez-star:nth-child(3) { animation-delay: 0.1s; }
.ez-stars:hover .ez-star:nth-child(4) { animation-delay: 0.15s; }
.ez-stars:hover .ez-star:nth-child(5) { animation-delay: 0.2s; }

/* Emoji Rating style */
.ez-emoji-rating {
  font-size: 1.4rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Verified Badge System */
.ez-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 99px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ez-verified-badge.verified-light {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.ez-verified-badge.verified-dark {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.ez-verified-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* Custom Audio Player */
.ez-audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(var(--ez-primary-rgb), 0.05);
  border: 1px solid rgba(var(--ez-primary-rgb), 0.15);
  padding: 8px 16px;
  border-radius: 99px;
  margin-top: 15px;
  max-width: 280px;
}

.ez-audio-btn {
  background: var(--ez-primary);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ez-audio-btn:hover {
  transform: scale(1.1);
  background: rgba(var(--ez-primary-rgb), 0.9);
}

.ez-audio-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.ez-audio-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  flex-grow: 1;
}

.ez-audio-wave-bar {
  width: 3px;
  height: 4px;
  background: rgba(var(--ez-primary-rgb), 0.4);
  border-radius: 99px;
  transition: height 0.1s ease;
}

.ez-audio-player.playing .ez-audio-wave-bar {
  background: var(--ez-primary);
  animation: ezAudioPulse 1.2s infinite ease-in-out alternate;
}

/* Stagger wave animations */
.ez-audio-player.playing .ez-audio-wave-bar:nth-child(1) { animation-delay: 0.1s; height: 16px; }
.ez-audio-player.playing .ez-audio-wave-bar:nth-child(2) { animation-delay: 0.3s; height: 10px; }
.ez-audio-player.playing .ez-audio-wave-bar:nth-child(3) { animation-delay: 0.5s; height: 18px; }
.ez-audio-player.playing .ez-audio-wave-bar:nth-child(4) { animation-delay: 0.2s; height: 8px; }
.ez-audio-player.playing .ez-audio-wave-bar:nth-child(5) { animation-delay: 0.4s; height: 14px; }
.ez-audio-player.playing .ez-audio-wave-bar:nth-child(6) { animation-delay: 0.6s; height: 12px; }

/* Video Play Overlay & Hover play indicator */
.ez-video-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.ez-video-badge svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

/* Lightbox Modal (For Video Popup) */
.ez-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 11, 15, 0.95);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ez-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.ez-lightbox-close {
  position: absolute;
  top: 25px;
  right: 25px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ez-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.ez-lightbox-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ez-lightbox-content {
  width: 90%;
  max-width: 800px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ez-lightbox.active .ez-lightbox-content {
  transform: scale(1);
}

.ez-lightbox-content iframe,
.ez-lightbox-content video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Floating Testimonial Popup */
.ez-floating-popup {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 340px;
  background: var(--ez-bg-light);
  border: 1px solid var(--ez-border-light);
  border-radius: 16px;
  box-shadow: 0 15px 35px -5px rgba(0,0,0,0.12), 0 5px 15px -5px rgba(0,0,0,0.04);
  padding: 18px;
  z-index: 9999;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.ez-floating-popup.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ez-floating-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.ez-floating-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

.ez-floating-close svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* Live Activity Notification style */
.ez-live-activity {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 12px 16px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.ez-live-activity.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.ez-live-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ez-primary);
}

.ez-live-info {
  flex-grow: 1;
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.3;
}

.ez-live-info strong {
  color: #111827;
}

.ez-live-time {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 2px;
}

/* Reels Mode (Fullscreen swipeable modal) */
.ez-reels-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 999999;
  display: none;
  flex-direction: column;
}

.ez-reels-modal.active {
  display: flex;
}

.ez-reels-header {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 10;
  color: #fff;
}

.ez-reels-close {
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ez-reels-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.ez-reel-slide {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.ez-reel-video-wrap {
  width: 100%;
  height: 100%;
  max-width: 480px;
  background: #111;
  position: relative;
  overflow: hidden;
}

.ez-reel-video-wrap video,
.ez-reel-video-wrap iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ez-reel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
  padding: 30px 20px 40px;
  z-index: 5;
}

.ez-reel-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ez-reel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}

.ez-reel-name {
  font-weight: bold;
  font-size: 1rem;
}

.ez-reel-desc {
  font-size: 0.8rem;
  opacity: 0.8;
}

.ez-reel-text {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animations */
@keyframes ezStarPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(8deg); }
  100% { transform: scale(1); }
}

@keyframes ezAudioPulse {
  0% { height: 4px; }
  100% { height: 20px; }
}

@keyframes ezFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}
