/* Página de Podcasts - Dumont */

/* Header da página de podcasts */
.podcasts-page-header {
  background: linear-gradient(135deg, #1a0a3e 0%, #2d1a5e 100%);
  padding: 15px 0;
  margin-top: 100px;
  margin-bottom: 40px;
  position: relative;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(26, 10, 62, 0.3);
}

.podcasts-page-title-container {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.podcast-icon-large {
  position: absolute;
  left: -50px;
  top: 0;
  transform: translateY(-55%);
  width: 200px;
  height: 200px;
  object-fit: contain;
  z-index: 10;
}

.podcasts-page-title {
  font-weight: 950;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  margin: 0;
  margin-left: 100px;
}

/* Select de seleção de programa */
.podcast-selector-container {
  margin-bottom: 30px;
}

.podcast-filter-form {
  width: 100%;
}

.podcast-select-box {
  width: 100%;
  background: white;
  color: #333;
  border: none;
  padding: 12px 20px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
  padding-right: 45px;
}

.podcast-select-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.podcast-select-box:focus {
  outline: 2px solid #2596be;
  outline-offset: 2px;
}

.podcast-select-box option {
  background: white;
  color: #333;
  padding: 10px;
}

/* Lista de episódios */
.podcast-episodes-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 0;
}

.podcast-episode-card {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: stretch;
  padding: 0;
  position: relative;
  min-height: 80px;
}

.podcast-episode-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.podcast-episode-image {
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 90px;
  height: 80px;
  max-height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.podcast-episode-image img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 120px;
  object-fit: cover;
}

.podcast-episode-content {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  line-height: normal;
  height: 100%;
}

.podcast-episode-date {
  font-size: 0.62rem;
  color: #b0b0b0;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.podcast-episode-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: #065aa4;
  margin: 0;
  line-height: 1.2;
}

.podcast-episode-show {
  font-size: 0.72rem;
  color: #666;
  font-weight: 600;
  margin: 0;
}

/* Overlay com botões de ação */
.podcast-episode-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.podcast-overlay-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.podcast-episode-card:hover .podcast-episode-overlay {
  opacity: 1;
}

.podcast-episode-play-btn {
  background: transparent;
  border: 3px solid #065aa4;
  border-radius: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.podcast-episode-play-btn:hover {
  transform: scale(1.1);
}

.podcast-episode-play-btn .play-icon,
.podcast-episode-play-btn .stop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.podcast-episode-play-btn svg {
  width: 16px;
  height: 16px;
  fill: #065aa4;
}

.podcast-episode-play-btn .play-icon svg {
  margin-left: 1px;
}

.podcast-episode-play-btn .stop-icon svg {
  margin-left: 0;
}

.podcast-overlay-download-btn {
  background: white;
  border: 3px solid #065aa4;
  border-radius: 0;
  padding: 0 10px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #065aa4;
  font-weight: 700;
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  flex-shrink: 0;
}

.podcast-overlay-download-btn:hover {
  transform: scale(1.1);
}

/* Botão de download nos cards do app */
.podcast-download-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

/* Na tab de baixados, esconde completamente o botão de download para não bloquear cliques no X */
.downloaded-tab-card .podcast-download-btn {
  display: none;
}

.podcast-download-btn:hover {
  transform: translateY(-50%) scale(1.15);
  opacity: 0.8;
}

.podcast-download-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.download-icon,
.loading-icon,
.cancel-icon {
  width: 20px;
  height: 20px;
  fill: #5cc3bd;
  transition: all 0.2s ease;
}

.check-icon {
  width: 22px;
  height: 22px;
  fill: #5cc3bd;
  transition: all 0.2s ease;
}

.loading-icon {
  stroke: #5cc3bd;
}

.cancel-icon {
  width: 18px;
  height: 18px;
  fill: #ff6b6b;
  cursor: pointer;
  z-index: 20;
}

/* Botão de deletar nos cards baixados */
.podcast-delete-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 45px;
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

/* Na tab de baixados, o X fica à direita (sem gap do botão de download) */
.downloaded-tab-card .podcast-delete-btn {
  right: 12px;
}

.podcast-delete-btn:hover {
  transform: translateY(-50%) scale(1.2);
  opacity: 0.8;
}

.podcast-delete-btn:active {
  transform: translateY(-50%) scale(0.9);
}

.podcast-delete-btn svg {
  width: 14px;
  height: 14px;
  fill: #dc3545;
  transition: all 0.2s ease;
}

.podcast-delete-btn:hover svg {
  fill: #c82333;
  transform: scale(1.1);
}

/* Download progress container */
.download-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  animation: pulse 1.5s ease-in-out infinite;
  min-width: 40px;
}

.download-progress-container .loading-icon {
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

.download-progress-container .progress-percentage {
  font-size: 11px;
  font-weight: 700;
  color: #5cc3bd;
  line-height: 1;
}

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

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Tabs de navegação */
.podcast-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #e5e5e5;
  padding: 68px 16px 16px 16px;
}

.podcast-tab {
  text-align: center;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 700;
  color: #1b96d1;
  background: transparent;
  border: 2px solid #1b96d1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.podcast-tab:first-child {
  border-radius: 8px 0 0 8px;
  border-right-width: 1px;
}

.podcast-tab:last-child {
  border-radius: 0 8px 8px 0;
  border-left-width: 1px;
}

.podcast-tab.active {
  background: #1b96d1;
  color: white;
}

/* Paginação */
.podcast-pagination {
  margin: 40px 0 60px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 35px;
  padding: 0;
  background: white;
  color: #333;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.pagination-btn:hover:not(.disabled) {
  background: #e0e0e0;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
  padding: 0 12px;
}

/* Mensagens quando não há conteúdo */
.no-podcasts,
.no-episodes {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-downloads {
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

.no-downloads p {
  font-size: 15px;
  margin: 0;
}

/* Estilos específicos para o app */
body.app-layout .container-app.podcasts-container-app {
  margin-top: -50px;
}

body.app-layout .podcast-selector-container {
  padding-left: 16px;
  padding-right: 16px;
}

body.app-layout .podcast-episodes-list-app {
  padding-left: 0;
  padding-right: 0;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.app-layout .podcast-episodes-list-app .podcast-episode-card {
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #e0e0e0;
  margin: 0;
  min-height: 80px;
}

body.app-layout .podcast-episodes-list-app .podcast-episode-card:hover {
  transform: none;
  box-shadow: none;
}

body.app-layout .podcast-episode-image {
  min-width: 72px;
  max-width: 96px;
  height: 80px;
  max-height: 80px;
}

body.app-layout .podcast-episode-content {
  padding: 8px 12px;
}

body.app-layout .podcast-pagination {
  margin: 20px 16px 100px 16px;
}

/* Responsividade - Desktop pequeno e tablets */
@media (max-width: 1024px) {
  .podcasts-page-header {
    margin-top: 80px;
    padding: 12px 0;
  }

  .podcast-icon-large {
    left: -50px;
    width: 170px;
    height: 170px;
  }

  .podcasts-page-title {
    font-size: 1rem;
    margin-left: 80px;
  }

  .podcast-episodes-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .podcast-select-box {
    padding: 12px 15px;
    font-size: 0.9rem;
    padding-right: 40px;
  }

  .podcast-episode-image {
    min-width: 70px;
    max-width: 88px;
    height: 80px;
    max-height: 80px;
  }

  .podcast-episode-content {
    padding: 10px 12px;
  }

  .podcast-episode-title {
    font-size: 0.88rem;
  }

  .pagination-btn {
    min-width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .pagination-info {
    font-size: 0.9rem;
    padding: 0 12px;
  }
}

/* Responsividade - Mobile */
@media (max-width: 768px) {
  .podcasts-page-header {
    margin-top: 20px;
    padding: 20px 0;
  }

  .podcast-icon-large {
    display: none;
  }

  .podcasts-page-title {
    margin-left: 0;
    padding: 0 20px;
  }

  .podcast-episodes-list {
    grid-template-columns: 1fr;
  }

  .podcast-episode-image {
    min-width: 64px;
    max-width: 72px;
    height: 72px;
    max-height: 72px;
  }

  .podcast-episode-content {
    padding: 10px 12px;
    gap: 6px;
  }
}
