.atmcast-player {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  height: auto;
  min-height: 400px;
  overflow: hidden;
}

.atmcast-list {
  width: 30%;
  padding: 10px;
  box-sizing: border-box;
}

.atmcast-player-area {
  width: 70%;
  padding: 10px;
  box-sizing: border-box;
}

#atmcast-search {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

/* Accordion Styles */
#atmcast-episodes-accordion {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 365px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}

/* Scrollbar personalizada para o accordion principal */
#atmcast-episodes-accordion::-webkit-scrollbar {
  width: 6px;
}

#atmcast-episodes-accordion::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#atmcast-episodes-accordion::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

#atmcast-episodes-accordion::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.atmcast-accordion-item {
  margin-bottom: 0;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.atmcast-accordion-item:last-child {
  border-bottom: none;
}

.atmcast-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #e0e0e0;
}

.atmcast-accordion-header:hover {
  background: #e9ecef;
}

.atmcast-accordion-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.atmcast-episode-count {
  font-size: 12px;
  font-weight: 400;
  color: #666;
  margin-left: 8px;
}

.atmcast-accordion-icon {
  font-size: 18px;
  font-weight: bold;
  color: #666;
  transition: transform 0.3s ease;
}

.atmcast-accordion-item.active .atmcast-accordion-icon {
  transform: rotate(180deg);
}

.atmcast-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f9f9f9;
  border-top: 1px solid #e0e0e0;
}

.atmcast-accordion-content.open {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 5px 16px 8px;
  margin-right: 10px;
}

/* Scrollbar personalizada para o conteúdo dos episódios */
.atmcast-accordion-content::-webkit-scrollbar {
  width: 4px;
}

.atmcast-accordion-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.atmcast-accordion-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.atmcast-accordion-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}



/* Episode Card Styles */
.atmcast-episode-card {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 4px 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  max-width: calc(100% - 12px);
}

.atmcast-episode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #007cba;
}

.atmcast-episode-card:last-child {
  margin-bottom: 0;
}

.atmcast-episode-card.playing {
  background: #e7f3ff;
  border-color: #007cba;
  box-shadow: 0 2px 8px rgba(0,124,186,0.2);
}

.atmcast-episode-thumb-container {
  flex-shrink: 0;
  margin-right: 12px;
}

.atmcast-episode-thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.atmcast-episode-info {
  flex: 1;
  min-width: 0;
}

.atmcast-episode-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.atmcast-episode-date {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

/* Search Results */
#atmcast-no-results {
  text-align: center;
  padding: 20px;
  font-style: italic;
  color: #666;
  background: #f8f9fa;
  border-radius: 6px;
  margin: 10px 0;
}

/* Container para vídeo - comportamento padrão para desktop */
.atmcast-video-container {
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.atmcast-video-container iframe {
  width: 100%;
  height: 400px; /* Altura fixa para desktop */
  border: none;
  display: block;
}

.atmcast-video-container img {
  width: 100%;
  height: 400px; /* Altura fixa para desktop */
  object-fit: cover;
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .atmcast-player {
    flex-direction: column;
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
  }
  
  .atmcast-list {
    width: 100%;
    order: 1; /* Busca e listagem primeiro */
    margin-bottom: 20px;
  }
  
  .atmcast-player-area {
    width: 100%;
    order: 2; /* Vídeo por último */
    padding: 10px 0;
  }
  
  /* Container responsivo para mobile - aspect ratio 16:9 */
  .atmcast-video-container {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
  }
  
  .atmcast-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  .atmcast-video-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Ajustes para o campo de busca em mobile */
  #atmcast-search {
    font-size: 16px; /* Evita zoom no iOS */
    padding: 12px;
    margin-bottom: 20px;
  }
  
  /* Ajustes para o accordion em mobile */
  #atmcast-episodes-accordion {
    max-height: 300px; /* Reduz altura em mobile */
    margin-bottom: 20px;
  }
  
  .atmcast-accordion-content.open {
    max-height: 150px; /* Reduz altura do conteúdo */
  }
  
  /* Ajustes para os cards de episódio */
  .atmcast-episode-card {
    padding: 12px;
    margin: 6px 0;
  }
  
  .atmcast-episode-thumb {
    width: 50px;
    height: 38px;
  }
  
  .atmcast-episode-title {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .atmcast-episode-date {
    font-size: 11px;
  }
  
  .atmcast-accordion-header h3 {
    font-size: 15px;
  }
  
  .atmcast-episode-count {
    font-size: 11px;
  }
  
  /* Garante que o container do player não tenha altura fixa */
  .atmcast-player-area {
    height: auto !important;
    min-height: unset !important;
  }
}

/* Tablet - breakpoint intermediário */
@media (min-width: 769px) and (max-width: 1024px) {
  .atmcast-player {
    height: auto;
    min-height: unset;
  }
  
  .atmcast-list {
    width: 35%;
  }
  
  .atmcast-player-area {
    width: 65%;
  }
  
  /* Container responsivo para tablet - aspect ratio 16:9 */
  .atmcast-video-container {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
  }
  
  .atmcast-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  .atmcast-video-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Mobile pequeno - ajustes adicionais */
@media (max-width: 480px) {
  .atmcast-player {
    padding: 10px;
  }
  
  .atmcast-list {
    padding: 0;
  }
  
  .atmcast-player-area {
    padding: 0;
  }
  
  #atmcast-search {
    padding: 14px;
    font-size: 16px;
  }
  
  .atmcast-accordion-header {
    padding: 10px 12px;
  }
  
  .atmcast-accordion-header h3 {
    font-size: 14px;
  }
  
  .atmcast-episode-card {
    padding: 10px;
  }
  
  .atmcast-episode-thumb {
    width: 45px;
    height: 34px;
  }
  
  .atmcast-episode-title {
    font-size: 12px;
  }
  
  .atmcast-episode-date {
    font-size: 10px;
  }
}
