/* Aggiungi questi stili */
.podcast-filter {
    margin-bottom: 15px;
}

.podcast-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.podcast-filter input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.podcast-lists {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.podcast-list {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.podcast-list h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1em;
}

#listened-podcasts {
    opacity: 0.8;
}

/* Rimuovi gli stili non più necessari */
.podcast-filter,
#listened-podcasts {
    display: none;
}

/* Aggiorna gli stili del podcast player */
#podcast-player {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Stili per il contenitore dei controlli podcast */
.podcast-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Stili per il nuovo selettore di podcast */
.podcast-list-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.podcast-search {
    position: relative;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.podcast-search i {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.podcast-search input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.podcast-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.podcast-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.podcast-item:hover {
    background-color: #f5f5f5;
}

.podcast-item.selected {
    background-color: #e3f2fd;
    border-color: #2196F3;
}

.podcast-item.listened {
    opacity: 0.7;
}

.podcast-item-icon {
    width: 40px;
    height: 40px;
    background: #2196F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.podcast-item-icon i {
    color: white;
    font-size: 18px;
}

.podcast-item-content {
    flex: 1;
    min-width: 0;
}

.podcast-item-title {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podcast-item-date {
    font-size: 13px;
    color: #666;
}

.podcast-filters {
    display: flex;
    padding: 15px;
    gap: 10px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.filter-button {
    padding: 8px 15px;
    border: none;
    background: none;
    border-radius: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.filter-button:hover {
    color: #2196F3;
    background: #e3f2fd;
}

.filter-button.active {
    background: #2196F3;
    color: white;
}

/* Stili per la scrollbar personalizzata */
.podcast-items::-webkit-scrollbar {
    width: 8px;
}

.podcast-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.podcast-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.podcast-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .podcast-items {
        max-height: 400px;
    }

    .podcast-filters {
        overflow-x: auto;
        padding: 15px 10px;
    }

    .filter-button {
        white-space: nowrap;
    }
}

/* Contenitore per i pulsanti di azione */
.podcast-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Stili per il titolo della sezione */
#podcast-player h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#podcast-player h2 i {
    color: #2196F3;
}

/* Stili responsive */
@media (max-width: 768px) {
    #podcast-player {
        padding: 15px;
    }

    .podcast-controls {
        gap: 10px;
    }

    #podcast-select {
        padding: 15px;  /* Input più grande su mobile */
        font-size: 16px;  /* Previene lo zoom su iOS */
    }

    .podcast-buttons {
        justify-content: stretch;
    }

    .podcast-buttons button {
        flex: 1;
    }
}

/* Aggiungi la definizione dell'animazione spin */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

.share-podcast-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-podcast-button:hover {
    background-color: #1976D2;
}

.share-podcast-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Aggiungi questi stili per l'accordion e il layout */
.podcast-accordion {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.podcast-accordion-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.podcast-accordion-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.podcast-accordion-header .accordion-icon {
    transition: transform 0.3s ease;
    color: #666;
}

.podcast-accordion.open .accordion-icon {
    transform: rotate(180deg);
}

.podcast-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.podcast-accordion.open .podcast-accordion-content {
    max-height: 2000px; /* Un valore alto per permettere l'espansione completa */
}

/* Layout a due colonne */
.podcast-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.podcast-main-content {
    flex: 2;
    min-width: 0; /* Previene overflow su flex items */
}

.podcast-articles {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.podcast-articles h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.podcast-articles-list {
    overflow-y: auto;
    flex: 1;
}

.podcast-article-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: white;
    margin-bottom: 8px;
    border-radius: 4px;
}

.podcast-article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.podcast-article-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.podcast-article-category {
    font-size: 0.9em;
    color: #666;
}

/* Responsive */
@media (max-width: 1024px) {
    .podcast-layout {
        flex-direction: column;
    }

    .podcast-articles {
        min-width: 0;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .podcast-accordion-header {
        padding: 12px 15px;
    }

    .podcast-accordion-header h2 {
        font-size: 1.2em;
    }

    .podcast-layout {
        padding: 15px;
    }
}

/* Aggiungi questi stili per il nuovo pulsante */
.mark-unlistened-button {
    background-color: #FF9800;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-unlistened-button:hover {
    background-color: #F57C00;
}

.mark-unlistened-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
