/* Voyager2 Audiocast Frontend Styles */

/* Notification Bubble */
.voyager2-audiocast-bubble {
  position: fixed;
  right: 20px;
  top: 75%; /* Movido para baixo para evitar sobreposição com o bubble de Flashcards */
  transform: translateY(-50%);
  z-index: 9999;
  cursor: pointer;
  pointer-events: auto !important; /* Garantir que receba eventos de clique */
  /* Removida a animação de pulso */
  
}

.voyager2-audiocast-bubble-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(white, white), /* fundo branco sólido */
    linear-gradient(90deg, #00c6ff, #8d00ff, #ff00e5, #00c6ff); /* gradiente animado */
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 2px solid transparent !important;
  background-size: 300% 100%;
  color: #4285f4; /* cor do ícone alterada para azul */
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  position: relative;
  pointer-events: auto !important; /* Garantir que receba eventos de clique */
  animation: borderAnimation 6s ease infinite;
}

.voyager2-audiocast-bubble-inner:hover {
  transform: scale(1.1);
 
}

.voyager2-audiocast-icon {
  font-size: 24px;
  color: #8D00FF; /* Garantir que o ícone seja azul */
}

/* Animação para o movimento das cores da borda */
@keyframes borderAnimation {
  0% {
    background-position: 0% 50%, 0% 50%;
  }
  50% {
    background-position: 0% 50%, 100% 50%;
  }
  100% {
    background-position: 0% 50%, 0% 50%;
  }

}



.voyager2-audiocast-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #c50491;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}



/* Modal */
.voyager2-audiocast-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.voyager2-audiocast-modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 10% auto;
  padding: 30px;
  border-radius: 15px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.voyager2-audiocast-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.voyager2-audiocast-close:hover {
  color: #333;
}

.voyager2-audiocast-modal h2 {
  color: #4285f4;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  text-align: center;
}

.voyager2-audiocast-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* Player */
.voyager2-audiocast-player {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.05), rgba(141, 0, 255, 0.05));
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(66, 133, 244, 0.2);
}

.voyager2-audiocast-player h3 {
  color: #4285f4;
  margin-top: 0;
  font-size: 20px;
  border-bottom: 2px solid rgba(141, 0, 255, 0.2);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.voyager2-audiocast-content {
  margin-bottom: 20px;
  line-height: 1.6;
  display: none; /* Esconder o conteúdo de texto */
}

.voyager2-audiocast-audio {
  background: linear-gradient(135deg, #4285f4, #8d00ff);
  padding: 15px;
  border-radius: 10px;
  transition: all 0.2s ease;
  will-change: contents;
}

.voyager2-audiocast-audio audio {
  width: 100% !important;
  display: block;
  min-height: 40px;
}

/* Audio Player Styling */
.voyager2-audiocast-audio audio::-webkit-media-controls-panel {
  background-color: rgba(255, 255, 255, 0.9);
  will-change: transform;
}

.voyager2-audiocast-audio audio::-webkit-media-controls-play-button {
  background-color: #c50491;
  border-radius: 50%;
  will-change: transform;
}

/* Playback Speed Controls */
.voyager2-playback-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
  gap: 5px;
}

.voyager2-playback-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 5px;
}

.voyager2-speed-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voyager2-speed-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.voyager2-speed-btn.active {
  background-color: rgba(255, 255, 255, 0.4);
  font-weight: bold;
}

/* Archive Page Styles */
.voyager2-audiocast-archive {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Adicionar/modificar os estilos para o filtro de disciplinas */

/* Filtro simplificado conforme imagem de referência */
.voyager2-audiocast-filter-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* Modificamos o select para ter o efeito de borda animada */
.voyager2-audiocast-filter-container select {
  padding: 8px 12px;
  border: none !important; /* Removemos a borda original */
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  color: #333;
  min-width: 180px;
  position: relative;
  z-index: 1;
  
  /* Criamos a borda animada com gradiente */
  background-image: 
    linear-gradient(white, white), /* fundo branco */
    linear-gradient(90deg, #00c6ff, #8D00FF, #ff00e5, #00c6ff); /* gradiente animado */
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent !important;
  background-size: 300% 100%;
  animation: borderAnimation 6s ease infinite;
}




/* Animação para o movimento das cores */
@keyframes borderAnimation {
  0% { background-position: 0% 50%, 0% 50%; }
  50% { background-position: 0% 50%, 100% 50%; }
  100% { background-position: 0% 50%, 0% 50%; }
}


.voyager2-audiocast-filter-container button {
  background: linear-gradient(135deg, #6366f1, #8d00ff);
  color: white;
  border: none !important;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.voyager2-audiocast-filter-container button:hover {
  background: linear-gradient(135deg, #4f46e5, #7b00e0);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Grid de cards - Mantendo 3 lado a lado */
.voyager2-audiocast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Estilo para os cards de disciplina */
.voyager2-audiocast-card-header {
  padding: 15px;
  background: linear-gradient(135deg, #4285f4, #8d00ff);
  color: white;
  border-bottom: 1px solid #eee;
}

.voyager2-audiocast-card-header h3 {
  margin: 0;
  font-size: 18px;
  color: white;
}

.voyager2-audiocast-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
}

.voyager2-audiocast-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.voyager2-audiocast-card-date {
  font-size: 12px;
  opacity: 0.8;
  text-align: right;
  margin-top: 5px;
}

.voyager2-audiocast-card-body {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.voyager2-audiocast-card-content {
  margin-bottom: 15px;
  max-height: 100px;
  overflow: hidden;
  position: relative;
  display: none; /* Esconder o conteúdo de texto */
}

.voyager2-audiocast-card-audio {
  width: 100%;
  margin-top: auto;
}

/* Paginação - Novo estilo */
.voyager2-audiocast-pagination {
  margin: 30px 0;
  display: flex;
  justify-content: center;
}

.voyager2-audiocast-pagination-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  background: #fff;
  padding: 12px 15px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.voyager2-audiocast-pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
}

.voyager2-audiocast-pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
}

.voyager2-audiocast-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
  text-decoration: none;
}

.voyager2-audiocast-page-btn:hover:not(.disabled):not(.active) {
  background: #f1f3f4;
}

.voyager2-audiocast-page-btn.active {
  background: #4285f4;
  color: #fff;
  font-weight: bold;
}

.voyager2-audiocast-page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voyager2-audiocast-page-ellipsis {
  padding: 0 5px;
  color: #666;
}

.voyager2-audiocast-page-jump-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #e0e0e0;
}

.voyager2-audiocast-page-jump-container label {
  font-size: 14px;
  color: #666;
}

#voyager2-audiocast-page-jump {
  padding: 6px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  color: #333;
  min-width: 100px;
  max-width: 150px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .voyager2-audiocast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .voyager2-audiocast-modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 20px;
  }

  .voyager2-audiocast-bubble-inner {
    width: 40px !important;
    height: 40px !important;
    transform: scale(0.80)
  }

  .voyager2-audiocast-icon {
    font-size: 20px;
  }

  .voyager2-audiocast-grid {
    grid-template-columns: 1fr;
  }

  .voyager2-audiocast-filters {
    flex-direction: column;
    align-items: flex-end;
  }

  .voyager2-audiocast-filter-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .voyager2-audiocast-pagination-container {
    flex-direction: column;
    padding: 10px;
  }

  .voyager2-audiocast-page-jump-container {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }

  .voyager2-playback-controls {
    justify-content: center;
  }
}

/* Prevenir reflow durante o carregamento */
audio::-webkit-media-controls {
  will-change: transform;
}

