/* Scoped CSS for Voice Talents component */
.voice-talents-component {
  /* Base styles from HTML5 Boilerplate */
  font-size: 1em;
}

.voice-talents-component *::selection {
  background: #b3d4fc;
  text-shadow: none;
}

.voice-talents-component hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

.voice-talents-component audio,
.voice-talents-component canvas,
.voice-talents-component iframe,
.voice-talents-component img,
.voice-talents-component svg,
.voice-talents-component video {
  vertical-align: middle;
}

.voice-talents-component fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.voice-talents-component textarea {
  resize: vertical;
}

/* Container and general layout */
.voice-talents-component.container {
  /*max-width: 1200px;*/
  margin: 0 auto;
  padding: 20px;
}

.voice-talents-component header {
  margin-bottom: 30px;
}

.voice-talents-component h1 {
  margin-bottom: 20px;
  text-align: center;
}

/* Filter controls */
.voice-talents-component .filter-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 20px; /* Add gutter between filter groups */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.voice-talents-component .gender-filter {
  display: flex;
  gap: 10px;
}

.voice-talents-component .accent-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Unified pill-style filter buttons */
.voice-talents-component .filter-btn {
  padding: 6px 20px;
  background-color: transparent; /* Inactive buttons have transparent background */
  border: 1px solid transparent;
  border-radius: 50px; /* Pill shape */
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333; /* Default text color */
}

.voice-talents-component .filter-btn:hover {
  background-color: rgba(142, 173, 45, 0.1); /* Light primary color on hover */
}

.voice-talents-component .filter-btn.active {
  background-color: #8ead2d; /* Primary color for active state */
  color: white;
  border-color: #8ead2d;
}

/* Voices grid */
.voice-talents-component .voices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.voice-talents-component .voice-card {
  border: 1px solid #eee;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.voice-talents-component .voice-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.voice-talents-component .voice-card-header {
  display: flex;
  justify-content: flex-start;
  padding: 15px;
}

.voice-talents-component .voice-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.voice-talents-component .voice-info {
  flex: 1;
}

.voice-talents-component .voice-name {
  font-size: 18px;
  /*font-weight: bold;*/
  margin: 0 0 5px 0;
}

.voice-talents-component .voice-details {
  font-size: 14px;
  color: #8ead2d;
  margin: 0;
}

.voice-talents-component .voice-card-body {
  padding: 15px;
}

.voice-talents-component .voice-description {
  margin-bottom: 15px;
}

/* Audio player */
.voice-talents-component audio {
  display: none; /* Hide the native audio element */
}

.voice-talents-component .custom-audio-player {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-talents-component .play-pause-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.voice-talents-component .play-pause-btn:hover {
  background: rgba(142, 173, 45, 0.1);
}

.voice-talents-component .play-pause-btn svg {
  fill: #8ead2d;
  width: 20px;
  height: 20px;
}

.voice-talents-component .progress-container {
  flex-grow: 1;
  height: 36px;
  display: flex;
  align-items: center;
}

.voice-talents-component .progress-bar {
  width: 100%;
  height: 5px;
  background-color: #e0e0e0;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.voice-talents-component .progress {
  height: 100%;
  background-color: #8ead2d;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.voice-talents-component .time-display {
  min-width: 40px;
  text-align: right;
  font-size: 14px;
  color: #666;
  font-family: monospace;
  flex-shrink: 0;
}

.voice-talents-component .hidden {
  display: none;
}

/* Load more button */
.voice-talents-component .load-more-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.voice-talents-component .load-more-btn {
  padding: 12px 30px;
  background-color: transparent;
  color: #8ead2d;
  border: 2px solid #8ead2d;
  border-radius: 0px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.voice-talents-component .load-more-btn:hover {
  background-color: rgba(142, 173, 45, 0.1);
}

.voice-talents-component .load-more-btn:disabled {
  background-color: transparent;
  color: #cccccc;
  border-color: #cccccc;
  cursor: not-allowed;
}

/* Loading animation */
@keyframes ohvo-voices-loading-dots {
  0%, 20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%, 100% {
    content: "...";
  }
}

.voice-talents-component .load-more-btn.loading::after {
  content: "";
  animation: ohvo-voices-loading-dots 1.5s infinite;
  display: inline-block;
  width: 20px;
  text-align: left;
}

/* Error message */
.voice-talents-component .error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 20px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  text-align: center;
  font-size: 16px;
  animation: ohvo-voices-fadeIn 0.3s ease;
}

/* No voices message */
.voice-talents-component .no-voices-message {
  background-color: #e2f0f7;
  color: #0c5460;
  padding: 20px;
  margin: 30px auto;
  border: 1px solid #bee5eb;
  border-radius: 4px;
  text-align: center;
  font-size: 16px;
  max-width: 600px;
  animation: ohvo-voices-fadeIn 0.3s ease;
}

.voice-talents-component .no-voices-message p {
  margin: 10px 0;
}

.voice-talents-component .no-voices-message p:last-child {
  font-weight: bold;
}

@keyframes ohvo-voices-fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
  .voice-talents-component .voices-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media only screen and (max-width: 480px) {
  .voice-talents-component .voices-grid {
    grid-template-columns: 1fr;
  }
}

/* Helper classes */
.voice-talents-component .hidden,
.voice-talents-component [hidden] {
  display: none !important;
}

.voice-talents-component .visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.voice-talents-component .visually-hidden.focusable:active,
.voice-talents-component .visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

.voice-talents-component .invisible {
  visibility: hidden;
}

.voice-talents-component .clearfix::before,
.voice-talents-component .clearfix::after {
  content: " ";
  display: table;
}

.voice-talents-component .clearfix::after {
  clear: both;
}