.tts-button-container {
  margin-top: 12px;
  width: 100%;
}

.tts-button {
  display: flex;
  width: 100%;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 30px;
  background: #212C68;
  color: #FFF;
  border: none;
  position: relative;
}

.tts-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tts-button-icon,
.tts-button-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tts-icon-loading {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tts-button-text {
  flex-shrink: 0;
}

.tts-audio {
  display: none;
}

.tts-button-text-location {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  max-width: 150px;
  flex-shrink: 0;
}

.tts-button-text-location span {
  display: inline-block;
  animation: marquee 10s linear infinite;
  white-space: nowrap;
}

.tts-button-text-location::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(to right, #212C68 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.tts-button-text-location::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(to left, #212C68 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.tts-button:hover .tts-button-text-location {
  animation-play-state: paused;
}

@media (max-width: 1199px) {
  .tts-button-text-location {
    max-width: 110px;
  }
}

@media (max-width: 991px) {
  .tts-button-text-location {
    max-width: 60px;
  }
}

@media (max-width: 767px) {
  .tts-button-text-location {
    width: auto;
    max-width: unset;
    overflow: visible;
  }

  .tts-button-text-location::before,
  .tts-button-text-location::after {
    display: none;
  }

  .tts-button-text-location span {
    animation: none;
  }
}

@media (max-width: 761px) {
  .tts-button-text-location {
    width: 100%;
    max-width: 200px;
    overflow: hidden;
  }

  .tts-button-text-location::before,
  .tts-button-text-location::after {
    display: block;
  }

  .tts-button-text-location span {
    animation: marquee 10s linear infinite;
  }
}

@media (max-width: 599px) {
  .tts-button-text-location {
    width: 100%;
    max-width: 150px;
  }
}

/* Tooltip Styles */
.tts-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 200px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  text-align: left;
}

.tts-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tts-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
}

.tts-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 23px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid rgba(0, 0, 0, 0.1);
  z-index: -1;
}

@media (max-width: 767px) {
  .tts-tooltip {
    min-width: 180px;
    font-size: 13px;
    padding: 10px 14px;
  }
}