/* css/panopto-player.css */
.panopto-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    background: transparent;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.audio-container {
    position: relative;
    padding-bottom: 1.5em;
    height: 0;
    overflow: hidden;
    margin: 1em 0 0.5em;
    background: transparent;
}



.video-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 20px 15px 0;
}

.video-item {
    display: flex;
    cursor: pointer;
    background: #f5ffe2eb;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.video-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.thumbnail-container {
    position: relative;
    width: 40%;
    height: 160px;
    flex-shrink: 0;
}

.thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.video-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #333;
}


.video-description {
            position: relative;
               overflow: hidden;
             max-height: 3em; /* Limita l'altezza iniziale */
            transition: max-height 1s cubic-bezier(0, 1, 0, 1); /* Aggiunge una transizione fluida */
            color: #666;
            font-size: 0.9rem;
        }

        .video-description:hover {
           max-height: 30em; /* Espande l'altezza per mostrare tutto */
           transition: max-height 1s ease-in-out;
        }
        .video-description .full-description {
             display: inline;
        }

        .video-description .short-description {
            display: inline;
        }

        .video-description:hover .short-description {
            display: none; /* Nasconde la versione breve */
        }

        .video-description:hover .full-description {
            display: inline; /* Mostra la descrizione completa */
        }

        .hidden {
            display: none;
        }

        .short-description {
            display: block;        
        }

.duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.observer-target {
    height: 20px;
    margin-top: 20px;
}

.current-title {font-family: 'PT Serif',Georgia,"Times New Roman",serif;}


.audio-player-container {
    max-width: 600px;
    margin: 20px auto;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.audio-player {
    padding: 15px;
    background: transparent;
}

.player-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Style the native audio player for better Firefox compatibility */
audio {
   border-radius:12px;
    width: 93%;
    height: 40px;
    margin: 5px 0;
    background: transparent;
}

/* Firefox-specific styles */
@-moz-document url-prefix() {
    audio {max-width:93%;
        border-radius:12px;
        height: 35px;
        border-radius: 12px;
    }
}

.audio-playlist {
    max-height: 300px;
    overflow-y: auto;
}

.playlist-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.playlist-item:hover {
    background-color: #f0f0f0;
}

.playlist-item.active {
    background-color: #e6e6e6;
    font-weight: 600;
}

.playlist-title {
    flex: 1;
    margin-right: 15px;
}

.playlist-date {
    color: #666;
    font-size: 0.9em;
}



audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure {
  max-width: 93%;
}
