/* Container to ensure perfect horizontal and vertical alignment */
.ghaith-controls-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  height: 45px;
  /* Matches the audio-visual-wrapper-mob height */
}

/* Remove bottom margin from the mobile container to prevent pushing it up */
.ghaith-mobile-container {
  cursor: pointer;
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
}

/* Language Switcher Styling */
.ghaith-lang-toggle {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
  min-width: 40px;
  max-width: 65px;
  margin-left: 5px;
  height: 25px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgb(180 201 246);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

[lang="ar"] .ghaith-lang-toggle {
  min-width: 50px;
  margin-left: initial;
  margin-right: 5px;
}

.ghaith-lang-toggle:focus,
.ghaith-lang-toggle:focus-visible,
.ghaith-lang-toggle:hover,
.ghaith-lang-toggle:active {
  outline: none;
  box-shadow: none;
  border-color: rgb(180 201 246);
  background: transparent;
}

.ghaith-lang-toggle.is-visible {
  display: flex;
  /* Shown when playing */
  opacity: 1;
}

.ghaith-lang-toggle span {
  position: relative;
  top: 0.5px;
  font-size: 13px;
  font-weight: 800;
  color: #14194d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  /* Prevents text from pushing the box height */
}

/* 
[lang="ar"] .ghaith-lang-toggle span {
    top: -1.5px;
} */

/* Interaction States */
.ghaith-lang-toggle:hover {}

.ghaith-lang-toggle:active {
  transform: scale(0.95);
}

.ghaith-lang-toggle:active span {
  color: #ffffff;
}

.audio-visual-wrapper-mob {
  position: relative;
  width: 45px;
  height: 45px;
  left: -5.5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-core-mob {
  position: relative;
  width: 35px;
  height: 35px;
  background: transparent;
  backdrop-filter: blur(10px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.pulse-wave-mob {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.2px solid rgba(58, 118, 253, 0.18);
  z-index: 1;
  animation: orbitDot 5s linear infinite;
}

.pulse-wave-mob::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #dc3545;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 8px #dc3545, 0 0 16px rgba(0, 0, 0, 0.125);
}

.ghaith-mobile-container.is-playing .pulse-wave-mob {
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1.2px solid rgba(58, 118, 253, 0.35);
  animation: orbitDot 5s linear infinite;
}

.ghaith-mobile-container.is-playing .pulse-wave-mob::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #28a745;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow:
    0 0 10px rgba(3, 242, 35, 0.9),
    0 0 20px rgba(3, 242, 35, 0.6);
}

#mobileText {
  font-size: 16px;
  font-weight: 700;
  color: #14194d;
}

@keyframes orbitDot {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


.state-hidden {
  display: none !important;
}

.state-visible {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.audio-visual-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-core {
  position: relative;
  width: 75px;
  height: 75px;
  background: #14194d;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  box-shadow: 0 0 20px rgba(58, 118, 253, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.6s ease;
}

.pulse-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(#f8f9fa, #f8f9fa) padding-box,
    linear-gradient(135deg, #00d2ff, #3a76fd) border-box;
  z-index: 1;
  animation: ringRotate 4s linear infinite;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ringRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.audio-visual-btn.is-active .pulse-wave {
  width: 84px;
  height: 84px;
  background: transparent;
  border: 1.5px solid rgba(58, 118, 253, 0.15);
  animation: orbitDot 5s infinite linear;
  z-index: 5;
}

.audio-visual-btn.is-active .pulse-wave::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  background: #3a76fd;
  border-radius: 50%;
  box-shadow: 0 0 10px #3a76fd, 0 0 20px rgba(0, 210, 255, 0.6);
  animation: dotSize 3s infinite ease-in-out;
}

@keyframes orbitDot {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes dotSize {

  0%,
  100% {
    transform: scale(1) translateX(-50%);
    opacity: 0.6;
    filter: blur(0.5px);
  }

  50% {
    transform: scale(1.3) translateX(-50%);
    opacity: 1;
    box-shadow: 0 0 15px #3a76fd, 0 0 25px rgba(0, 210, 255, 0.8);
    filter: blur(0px);
  }
}

.audio-visual-btn.is-active .btn-core {
  border: 1px solid rgba(58, 118, 253, 0.2);
  box-shadow: 0 0 15px rgba(58, 118, 253, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.2);
}

#activeState svg {
  position: relative;
  z-index: 20;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

#ghaith-features-list.ghaith-active-icons i {
  color: #28a745 !important;
  transition: color 0.5s ease;
}

/* Ghaith Voice Interaction Background:
   Creates a smooth, high-fidelity fade-in effect for the hero section background.
   Uses an absolute pseudo-element to bypass browser limitations on gradient transitions.
*/
/* Ghaith Smooth Background Transition:
   Using background-color as a bridge to ensure smooth interpolation 
   since browsers cannot animate gradients directly.
*/
.hero-section {
  transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    background-image 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hero-section.ghaith-active-bg {
  background-color: rgba(40, 167, 69, 0.03) !important;
  background-image: linear-gradient(to top, rgba(40, 167, 69, 0.15) 0%, transparent 50%) !important;
}

[lang="ar"] .hero-section.ghaith-active-bg {
  background-color: rgba(40, 167, 69, 0.03) !important;
  background-image: linear-gradient(to top, rgba(40, 167, 69, 0.15) 0%, transparent 50%) !important;
}

/* Ghaith Voice Interaction Container */
.ghaith-icon-container {
  width: 60px !important;
  height: 61px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset-inline-start: 0;
  z-index: 5;
  border-inline-end: 1px solid #d0dcf2 !important;
  transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    background-image 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.original-icon {
  width: 60px !important;
  height: 61px;
  font-size: 20px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  color: #545980;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-bars {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 60px;
}

.voice-bars span {
  width: 3px;
  background-color: #545980;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

/* Active State Styles */

.try-free-text.is-playing {
    color: #28a745 !important; 
    text-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
}

#nav-features-link.is-playing .ghaith-icon-container {
  background-color: rgba(40, 167, 69, 0.03) !important;
  background-image: linear-gradient(to top, rgba(40, 167, 69, 0.15) 0%, transparent 50%) !important;
}

#nav-features-link.is-playing .original-icon {
  opacity: 0;
  transform: scale(0);
}

#nav-features-link.is-playing .voice-bars {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

#nav-features-link.is-playing .voice-bars span {
  background-color: #545980;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

/* Bar Animations */
#nav-features-link.is-playing .voice-bars span:nth-child(1) {
  animation: bar-1 0.8s infinite ease-in-out;
}

#nav-features-link.is-playing .voice-bars span:nth-child(2) {
  animation: bar-2 1.1s infinite ease-in-out;
}

#nav-features-link.is-playing .voice-bars span:nth-child(3) {
  animation: bar-3 0.9s infinite ease-in-out;
}

@keyframes bar-1 {

  0%,
  100% {
    height: 8px;
  }

  50% {
    height: 18px;
  }
}

@keyframes bar-2 {

  0%,
  100% {
    height: 12px;
  }

  50% {
    height: 26px;
  }
}

@keyframes bar-3 {

  0%,
  100% {
    height: 6px;
  }

  50% {
    height: 14px;
  }
}