/**
 * WP TTS Styles
 */

/* Initial Button */
.wp-tts-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  margin: 20px 0;
  color: #ffffff !important;
  border-color: #2e727d;
  border-radius: 10px;
  font-weight: 700 !important;
  background-color: #2e727d;
  margin-left: 20px;
  border: none;
}

.wp-tts-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.wp-tts-button-text {
  display: inline-block;
}

.wp-tts-button:hover {
  background-color: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.wp-tts-button:active {
  transform: translateY(0);
}

.wp-tts-button:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.wp-tts-button.wp-tts-playing {
  background-color: #d63638;
}

.wp-tts-button.wp-tts-playing:hover {
  background-color: #b32d2e;
}

.wp-tts-button.wp-tts-paused {
  background-color: #00a32a;
}

.wp-tts-button.wp-tts-paused:hover {
  background-color: #007a20;
}

/* Floating Bar */
.wp-tts-floating-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999999;
  transition: bottom 0.3s ease;
  border-top: 1px solid #ddd;
}

.wp-tts-floating-bar.wp-tts-visible {
  bottom: 0;
}

.wp-tts-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Control Buttons */
.wp-tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px;
  color: #333;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wp-tts-btn:hover {
  background-color: #e0e0e0;
  transform: scale(1.05);
}

.wp-tts-btn:active {
  transform: scale(0.95);
}

.wp-tts-btn:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.wp-tts-btn-play {
  background-color: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

.wp-tts-btn-play:hover {
  background-color: #005a87;
  border-color: #005a87;
}

.wp-tts-btn-pause {
  background-color: #d63638;
  color: #fff;
  border-color: #d63638;
}

.wp-tts-btn-pause:hover {
  background-color: #b32d2e;
  border-color: #b32d2e;
}

.wp-tts-btn-stop {
  background-color: #666;
  color: #fff;
  border-color: #666;
}

.wp-tts-btn-stop:hover {
  background-color: #555;
  border-color: #555;
}

.wp-tts-btn-close {
  background-color: transparent;
  color: #666;
  border-color: #ddd;
  font-size: 24px;
  line-height: 1;
}

.wp-tts-btn-close:hover {
  background-color: #f0f0f0;
  color: #333;
}

/* Time Display */
.wp-tts-time-display {
  font-size: 14px;
  color: #666;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums;
  padding: 0 16px;
  white-space: nowrap;
}

.wp-tts-time-elapsed {
  font-weight: 600;
  color: #333;
}

.wp-tts-time-remaining {
  color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wp-tts-controls {
    padding: 12px 16px;
    gap: 8px;
  }

  .wp-tts-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .wp-tts-time-display {
    font-size: 12px;
    padding: 0 8px;
  }

  .wp-tts-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .wp-tts-controls {
    flex-wrap: wrap;
    gap: 6px;
  }

  .wp-tts-time-display {
    width: 100%;
    text-align: center;
    order: -1;
    padding-bottom: 8px;
  }

  .wp-tts-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .wp-tts-floating-bar,
  .wp-tts-button,
  .wp-tts-btn {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .wp-tts-button {
    border: 2px solid currentColor;
  }

  .wp-tts-btn {
    border-width: 2px;
  }

  .wp-tts-floating-bar {
    border-top-width: 2px;
  }
}
