/*
Theme Name: Byblos WordPress Child Theme
Description: Child theme for Byblos Restaurant website
Author: Red Earth Designs
Version: 1.0
Template: grandrestaurant
*/

/* ========================================
   ELEMENTOR VIDEO SCROLLING FIXES
   ======================================== */

/* Fix 1: Background video overlay blocks scroll */
.elementor-background-video-container,
.elementor-background-video-overlay {
  pointer-events: none;
}

/* Fix 2: Section overflow locks scrolling */
.elementor-section.elementor-section-height-full {
  overflow: visible !important;
}

/* Additional Elementor video fixes */
.elementor-widget-video .elementor-widget-container {
  overflow: visible !important;
}

.elementor-section[data-elementor-type="section"] {
  overflow: visible !important;
}

/* Fix for video widgets that might block scroll */
.elementor-widget-video iframe,
.elementor-widget-video video {
  pointer-events: auto;
}

/* Ensure video containers don't interfere with scroll */
.elementor-background-video-container {
  z-index: 1;
}

.elementor-background-video-overlay {
  z-index: 2;
  pointer-events: none;
}

/* Fix for full-width video sections */
.elementor-section.elementor-section-boxed .elementor-container {
  overflow: visible !important;
}

/* Additional scroll fixes for Elementor */
.elementor-section {
  overflow: visible !important;
}

.elementor-container {
  overflow: visible !important;
}

/* Fix scroll trap - prevent video sections from blocking scroll continuity */
.elementor-section {
  position: relative !important;
  overflow: visible !important;
  z-index: auto !important;
}

.elementor-container {
  position: relative !important;
  overflow: visible !important;
  z-index: auto !important;
}

/* Ensure video sections don't create scroll boundaries */
.elementor-section[data-elementor-type="section"] {
  overflow: visible !important;
  position: relative !important;
}

/* Fix for video widgets that create scroll traps */
.elementor-widget-video {
  position: relative !important;
  overflow: visible !important;
  z-index: auto !important;
}

.elementor-widget-video .elementor-widget-container {
  position: relative !important;
  overflow: visible !important;
  z-index: auto !important;
}

/* Prevent video iframe from blocking scroll events */
.elementor-widget-video iframe {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Fix scroll continuity after video sections */
.elementor-section:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
}

/* Ensure body maintains scroll capability */
body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: relative !important;
}

/* Fix for full-height video sections that trap scroll */
.elementor-section.elementor-section-height-full {
  overflow: visible !important;
  position: relative !important;
  min-height: 100vh !important;
}

/* Smooth scroll compatibility */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ========================================
   AUDIO PLAYER BUTTON
   ======================================== */

#audio-player-button {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  background: #e3dac6;
  color: rgb(5, 42, 60);
  border: none;
  border-radius: 50px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: none;
  transition: all 0.3s ease;
  font-family: 'Cormorant Garamond', serif;
  overflow: hidden;
}

#audio-player-button:hover {
  transform: translateY(-3px);
  box-shadow: none;
  background: #ebe4d4;
}

#audio-player-button:active {
  transform: translateY(-1px);
  box-shadow: none;
}

#audio-player-button .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#audio-player-button .play-icon,
#audio-player-button .pause-icon {
  width: 0;
  height: 0;
  border-style: solid;
  transition: all 0.3s ease;
}

#audio-player-button .play-icon {
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent rgb(5, 42, 60);
  margin-left: 2px;
}

#audio-player-button .pause-icon {
  display: none;
  width: 16px;
  height: 20px;
  border-left: 5px solid rgb(5, 42, 60);
  border-right: 5px solid rgb(5, 42, 60);
  border-top: none;
  border-bottom: none;
}

#audio-player-button.playing .play-icon {
  display: none;
}

#audio-player-button.playing .pause-icon {
  display: block;
}

#audio-player-button .text {
  position: relative;
  white-space: nowrap;
}

/* Pulse animation when playing */
#audio-player-button.playing::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background: rgba(227, 218, 198, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0;
  }
}

/* Responsive styling */
@media only screen and (max-width: 768px) {
  #audio-player-button {
    bottom: 20px;
    left: 20px;
    padding: 12px 24px;
    font-size: 12px;
    gap: 10px;
  }
  
  #audio-player-button .icon {
    width: 16px;
    height: 16px;
  }
  
  #audio-player-button .play-icon {
    border-width: 8px 0 8px 12px;
  }
  
  #audio-player-button .pause-icon {
    width: 12px;
    height: 16px;
    border-left: 4px solid rgb(5, 42, 60);
    border-right: 4px solid rgb(5, 42, 60);
  }
}

@media only screen and (max-width: 480px) {
  #audio-player-button .text {
    display: none;
  }
  
  #audio-player-button {
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    justify-content: center;
  }
}
