/* Hook Player Styles - Redesigned for Unified Controls */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

/* CSS Variables for shared styling */
:root {
  --hook-player-bg-color: rgba(36,40,54,0.45);
  --hook-player-border-radius: 18px;
  --hook-player-shadow: 0 4px 18px 0 rgba(246,193,119,0.10), 0 1.5px 8px 0 rgba(30,34,44,0.13);
  --hook-player-backdrop: blur(8px) saturate(120%);
  --hook-player-text-color: #ffffff;
  --hook-player-padding: 30px;
  --hook-player-transition: all 0.3s ease;
  --hook-player-text-scroll-duration: 116s;
}

/* Main Container */
.hook-player-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  gap: 20px;
}

/* Controls Container */
.hook-player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Desktop Layout */
@media (min-width: 769px) {
  .hook-player-wrapper {
    flex-direction: row;
    gap: 20px;
  }
  
  .hook-player-controls {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
  
  .hook-player-play-button {
    width: 200px; /* Half width of text box (400px / 2) */
    height: 150px; /* Same height as text box */
    background: var(--hook-player-bg-color);
    border-radius: var(--hook-player-border-radius);
    box-shadow: var(--hook-player-shadow);
    backdrop-filter: var(--hook-player-backdrop);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hook-player-transition);
    position: relative;
    z-index: 1000;
    flex-shrink: 0;
  }
  
  .hook-player-play-button:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px 0 rgba(246,193,119,0.15), 0 2px 12px 0 rgba(30,34,44,0.18);
  }
  
  .hook-player-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 25px 0 25px 40px; /* Larger play icon for bigger button */
    border-color: transparent transparent transparent var(--hook-player-text-color);
    transition: var(--hook-player-transition);
  }
  
  .hook-player-play-button.playing::before {
    content: '';
    width: 30px;
    height: 40px;
    background: var(--hook-player-text-color);
    border: none;
  }
  
  .hook-player-text-box {
    width: 400px;
    height: 150px;
    background: var(--hook-player-bg-color);
    border-radius: var(--hook-player-border-radius);
    box-shadow: var(--hook-player-shadow);
    backdrop-filter: var(--hook-player-backdrop);
    padding: var(--hook-player-padding);
    color: var(--hook-player-text-color);
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
  }
  
  .hook-player-text-content {
    width: 100%;
    height: 100%;
    transition: var(--hook-player-transition);
  }
  
  .hook-player-text-content.playing {
    /* Animation controlled by global CSS */
  }
  
  .hook-player-text-content:not(.playing) {
    animation-play-state: paused !important;
  }
}

/* Mobile Layout */
@media (max-width: 768px) {
  .hook-player-wrapper {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    transform: none;
    justify-content: flex-start;
    padding-top: 10vh;
  }
  
  .hook-player-controls {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
  }
  
  .hook-player-play-button {
    width: 90vw; /* Same width as text box on mobile */
    max-width: 400px; /* Same max-width as text box */
    height: 120px; /* Same height as text box */
    background: var(--hook-player-bg-color);
    border-radius: var(--hook-player-border-radius);
    box-shadow: var(--hook-player-shadow);
    backdrop-filter: var(--hook-player-backdrop);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hook-player-transition);
    position: relative;
    z-index: 1000;
  }
  
  .hook-player-play-button:hover {
    transform: scale(1.02);
  }
  
  .hook-player-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 20px 0 20px 32px; /* Larger play icon for mobile */
    border-color: transparent transparent transparent var(--hook-player-text-color);
    transition: var(--hook-player-transition);
  }
  
  .hook-player-play-button.playing::before {
    content: '';
    width: 24px;
    height: 32px;
    background: var(--hook-player-text-color);
    border: none;
  }
  
  .hook-player-text-box {
    width: 90vw;
    max-width: 400px;
    height: 120px; /* Same height as play button */
    background: var(--hook-player-bg-color);
    border-radius: var(--hook-player-border-radius);
    box-shadow: var(--hook-player-shadow);
    backdrop-filter: var(--hook-player-backdrop);
    padding: 20px;
    color: var(--hook-player-text-color);
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    position: relative;
    z-index: 100;
  }
  
  .hook-player-text-content {
    width: 100%;
    transition: var(--hook-player-transition);
  }
  
  .hook-player-text-content.playing {
    /* Animation controlled by global CSS */
  }
  
  .hook-player-text-content:not(.playing) {
    animation-play-state: paused;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hook-player-wrapper {
    gap: 10px;
    padding: 15px;
    padding-top: 5vh;
  }
  
  .hook-player-controls {
    gap: 10px;
  }
  
  .hook-player-play-button {
    width: 95vw; /* Same width as text box */
    max-width: 350px; /* Same max-width as text box */
    height: 100px; /* Same height as text box */
  }
  
  .hook-player-play-button::before {
    border-width: 16px 0 16px 26px; /* Adjusted for smaller size */
  }
  
  .hook-player-play-button.playing::before {
    width: 20px;
    height: 26px;
  }
  
  .hook-player-text-box {
    width: 95vw;
    max-width: 350px;
    height: 100px; /* Same height as play button */
    font-size: 12px;
    padding: 15px;
  }
}

/* Text Animation - Fixed Version */
@keyframes scrollText {
  0% { 
    transform: translateY(0);
  }
  100% { 
    transform: translateY(-300%);
  }
}

/* Force animation to work properly */
.hook-player-text-content {
  animation: scrollText var(--hook-player-text-scroll-duration, 200s) linear infinite;
  animation-play-state: paused;
  animation-fill-mode: both;
  animation-direction: normal;
  animation-timing-function: linear;
  will-change: transform;
  transition: none;
  position: relative;
}

.hook-player-text-content.playing {
  animation-play-state: running !important;
}

.hook-player-text-content:not(.playing) {
  animation-play-state: paused !important;
}

/* Hide audio element */
audio { 
  display: none; 
}

/* Legacy support - hide old elements */
.player-container,
.play-button,
.desktop-play-button,
.text-box {
  display: none !important;
}

/* Elementor specific overrides */
.elementor-widget-hook_custom_player .hook-player-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  top: auto;
  left: auto;
  transform: none;
}

/* Ensure proper z-index in Elementor */
.elementor-widget-hook_custom_player {
  position: relative;
  z-index: 1;
}

/* Elementor editor mode styling */
.hook-player-play-button.elementor-editor-mode {
  cursor: pointer;
  opacity: 0.9;
}

.hook-player-play-button.elementor-editor-mode:hover {
  opacity: 1;
}

/* Focus states for accessibility */
.hook-player-play-button:focus {
  outline: 2px solid var(--hook-player-text-color);
  outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .hook-player-play-button:hover {
    transform: none;
  }
} 