/**
 * Google Elite Pro - Player Styles
 * 
 * Estilos para players de vídeo e áudio
 */

/* Container principal do player */
.gep-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gep-player-container.loading {
    background: #1a1a1a;
}

.gep-player-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #333;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: gep-spin 1s linear infinite;
    z-index: 10;
}

/* Player de vídeo */
.gep-video-player {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Player de áudio */
.gep-audio-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.gep-audio-player {
    width: 100%;
    margin-bottom: 15px;
}

.gep-audio-info h4 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.gep-file-size {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Controles do player */
.gep-player-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 20;
}

.gep-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.gep-download-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-decoration: none;
}

.gep-download-btn i {
    font-size: 14px;
}

/* Estilos específicos do Plyr */
.plyr-container .plyr {
    border-radius: 0;
}

.plyr-container .plyr--video {
    background: #000;
}

.plyr-container .plyr__control--overlaid {
    background: rgba(0, 124, 186, 0.9);
}

.plyr-container .plyr__control--overlaid:hover {
    background: rgba(0, 124, 186, 1);
}

.plyr-container .plyr__controls {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.plyr-container .plyr__control {
    color: #fff;
}

.plyr-container .plyr__control:hover {
    background: rgba(255, 255, 255, 0.1);
}

.plyr-container .plyr__progress__buffer {
    color: rgba(255, 255, 255, 0.3);
}

.plyr-container .plyr__volume__display {
    color: #fff;
}

/* Estilos específicos do Video.js */
.videojs-container .video-js {
    font-family: inherit;
}

.videojs-container .video-js .vjs-big-play-button {
    background-color: rgba(0, 124, 186, 0.9);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin-top: -40px;
    margin-left: -40px;
}

.videojs-container .video-js .vjs-big-play-button:hover {
    background-color: rgba(0, 124, 186, 1);
}

.videojs-container .video-js .vjs-control-bar {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.videojs-container .video-js .vjs-progress-control .vjs-progress-holder {
    height: 6px;
}

.videojs-container .video-js .vjs-play-progress {
    background-color: #007cba;
}

/* Estilos específicos do DPlayer */
.dplayer-container .dplayer {
    border-radius: 0;
}

.dplayer-container .dplayer-controller {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.dplayer-container .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played {
    background: #007cba;
}

.dplayer-container .dplayer-big-play {
    background: rgba(0, 124, 186, 0.9);
    border: none;
    border-radius: 50%;
}

.dplayer-container .dplayer-big-play:hover {
    background: rgba(0, 124, 186, 1);
}

/* Player HTML5 nativo */
.html5-container video {
    border-radius: 0;
}

.html5-container video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

/* Estados de erro */
.gep-player-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    border-radius: 8px;
}

.gep-player-error .error-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 15px;
}

.gep-player-error .error-message {
    font-size: 16px;
    margin-bottom: 10px;
}

.gep-player-error .error-details {
    font-size: 12px;
    color: #999;
}

/* Loading spinner */
.gep-player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.gep-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: gep-spin 1s linear infinite;
}

@keyframes gep-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay de informações */
.gep-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gep-player-overlay.show {
    opacity: 1;
    visibility: visible;
}

.gep-player-overlay .overlay-content {
    text-align: center;
    color: #fff;
}

.gep-player-overlay .overlay-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.gep-player-overlay .overlay-description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.gep-player-overlay .overlay-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gep-player-overlay .overlay-btn {
    padding: 10px 20px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gep-player-overlay .overlay-btn:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Playlist */
.gep-playlist {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-top: 20px;
}

.gep-playlist-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
    border-radius: 8px 8px 0 0;
}

.gep-playlist-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.gep-playlist-items {
    max-height: 300px;
    overflow-y: auto;
}

.gep-playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gep-playlist-item:hover {
    background: #f8f9fa;
}

.gep-playlist-item.active {
    background: #e3f2fd;
    border-left: 4px solid #007cba;
}

.gep-playlist-item:last-child {
    border-bottom: none;
}

.gep-playlist-item .item-thumbnail {
    width: 60px;
    height: 40px;
    background: #ddd;
    border-radius: 4px;
    margin-right: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.gep-playlist-item .item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gep-playlist-item .item-info {
    flex: 1;
    min-width: 0;
}

.gep-playlist-item .item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gep-playlist-item .item-duration {
    font-size: 12px;
    color: #666;
}

.gep-playlist-item .item-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gep-playlist-item:hover .item-actions {
    opacity: 1;
}

.gep-playlist-item .item-action {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.gep-playlist-item .item-action:hover {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
    text-decoration: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .gep-player-container {
        margin: 0 0 15px;
        border-radius: 4px;
    }
    
    .gep-player-controls {
        bottom: 5px;
        right: 5px;
    }
    
    .gep-download-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .gep-audio-container {
        padding: 15px;
    }
    
    .gep-playlist-item {
        padding: 10px 15px;
    }
    
    .gep-playlist-item .item-thumbnail {
        width: 50px;
        height: 35px;
        margin-right: 12px;
    }
    
    .gep-playlist-item .item-title {
        font-size: 13px;
    }
    
    .gep-playlist-item .item-duration {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .gep-player-overlay .overlay-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .gep-player-overlay .overlay-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .gep-playlist-items {
        max-height: 250px;
    }
}

/* Tema escuro */
.gep-theme-dark .gep-audio-container {
    background: #2d3748;
    border-color: #4a5568;
    color: #fff;
}

.gep-theme-dark .gep-audio-info h4 {
    color: #fff;
}

.gep-theme-dark .gep-file-size {
    background: #4a5568;
    color: #cbd5e0;
}

.gep-theme-dark .gep-playlist {
    background: #2d3748;
    border-color: #4a5568;
}

.gep-theme-dark .gep-playlist-header {
    background: #1a202c;
    border-color: #4a5568;
}

.gep-theme-dark .gep-playlist-title {
    color: #fff;
}

.gep-theme-dark .gep-playlist-item {
    border-color: #4a5568;
    color: #cbd5e0;
}

.gep-theme-dark .gep-playlist-item:hover {
    background: #4a5568;
}

.gep-theme-dark .gep-playlist-item.active {
    background: #2b6cb0;
    border-left-color: #63b3ed;
}

.gep-theme-dark .gep-playlist-item .item-title {
    color: #fff;
}

.gep-theme-dark .gep-playlist-item .item-duration {
    color: #a0aec0;
}

.gep-theme-dark .gep-playlist-item .item-action {
    background: #4a5568;
    border-color: #718096;
    color: #cbd5e0;
}

.gep-theme-dark .gep-playlist-item .item-action:hover {
    background: #63b3ed;
    border-color: #63b3ed;
    color: #1a202c;
}

/* Acessibilidade */
.gep-player-container:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.gep-download-btn:focus,
.gep-playlist-item:focus,
.gep-playlist-item .item-action:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Animações */
.gep-player-container {
    animation: gep-fade-in 0.5s ease-out;
}

@keyframes gep-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gep-playlist-item {
    animation: gep-slide-in 0.3s ease-out;
}

@keyframes gep-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Print styles */
@media print {
    .gep-player-container,
    .gep-audio-container,
    .gep-playlist {
        display: none;
    }
}