/**
 * wp-content/plugins/zikpawa/assets/css/zikpawa-player.css
 * Styles du lecteur audio Zikpawa
 * Version: 1.0.0
 */

/* Styles du player Zikpawa */
.zikpawa-player-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* En-tête */
.player-header {
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
}

.content-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.content-cover {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.content-cover.placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-cover.placeholder .material-icons {
    font-size: 80px;
    opacity: 0.7;
}

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

.content-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.content-description {
    margin-bottom: 20px;
    color: #b3b3b3;
    line-height: 1.6;
    font-size: 16px;
}

.content-artist {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #b3b3b3;
}

.artist-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.content-album {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #ff4081;
    font-size: 16px;
}

.content-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tracks-count, .content-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #ff4081;
}

.content-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.buy-content-btn, .play-all-btn, .buy-now-btn {
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.buy-content-btn, .buy-now-btn {
    background: linear-gradient(2deg, #2b5d2a 0%, #64d420 100%);
    color: white;
}

.buy-content-btn:hover, .buy-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    background: #fffc00;
}

.play-all-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(84, 191, 4, 80);
}

.play-all-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Player principal */
.audio-player {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.control-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.play-btn {
    background: #ff4081;
    width: 56px;
    height: 56px;
}

.play-btn:hover {
    background: #ff79b0;
    transform: scale(1.05);
}

.play-btn .material-icons {
    font-size: 36px;
}

.track-info {
    flex: 1;
    min-width: 200px;
}

.now-playing {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ff4081;
}

.track-time {
    font-size: 14px;
    color: #b3b3b3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-badge {
    background: #ff4081;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4081;
    cursor: pointer;
}

.progress-container {
    margin-top: 10px;
}

.progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4081 0%, #ff79b0 100%);
    border-radius: 3px;
}

.progress-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

/* Liste des tracks */
.tracks-list {
    /* padding: 20px 30px;*/
}

.list-header {
    display: grid;
    grid-template-columns: 60px 1fr 80px 120px;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #b3b3b3;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-col {
    padding: 0 10px;
}

.header-col.actions {
    text-align: center;
}

.tracks-container {
    max-height: 400px;
    overflow-y: auto;
}

.track-item {
    display: grid;
    grid-template-columns: 60px 1fr 80px 120px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
    cursor: pointer;
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.track-item.playing {
    background: rgba(255, 64, 129, 0.1);
}

.track-col {
    padding: 0 10px;
}

.track-col.number {
    display: flex;
    align-items: center;
    gap: 10px;
}

.track-number {
    width: 20px;
    text-align: right;
    color: #b3b3b3;
}

.track-play-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
}

.track-play-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.track-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.3;
}

.track-info-small {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
}

.preview-indicator {
    background: rgba(255, 64, 129, 0.2);
    color: #ff4081;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.track-sales {
    color: #4caf50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.track-col.duration {
    color: #b3b3b3;
    font-size: 14px;
}

.track-col.actions {
    text-align: center;
}

.buy-track-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.buy-track-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.no-tracks {
    text-align: center;
    padding: 40px;
    color: #b3b3b3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.no-tracks .material-icons {
    font-size: 60px;
    opacity: 0.5;
}

/* Footer */
.player-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info {
    color: #b3b3b3;
    font-size: 14px;
    flex: 1;
}

.footer-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.footer-actions {
    flex-shrink: 0;
}

/* Styles spécifiques pour les chansons individuelles */
.zikpawa-player-container[data-type="song"] .tracks-list {
    display: none; /* Cache la liste pour les singles */
}

.zikpawa-player-container[data-type="song"] .player-footer {
    border-top: none;
}

.zikpawa-player-error {
    text-align: center;
    padding: 40px;
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 10px;
    margin: 20px;
}

/* Scrollbar personnalisée */
.tracks-container::-webkit-scrollbar {
    width: 8px;
}

.tracks-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.tracks-container::-webkit-scrollbar-thumb {
    background: rgba(255, 64, 129, 0.5);
    border-radius: 4px;
}

.tracks-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 64, 129, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .content-info {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .content-cover {
        width: 150px;
        height: 150px;
    }
    
    .content-artist,
    .content-actions {
        justify-content: center;
    }
    
    .list-header,
    .track-item {
        grid-template-columns: 50px 1fr 60px 110px;
        font-size: 13px;
    }
    
    .player-footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-info, .footer-actions {
        width: 100%;
    }
    
    .volume-control {
        display: none;
    }
    
    .content-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .buy-content-btn,
    .play-all-btn,
    .buy-now-btn {
        width: 100%;
        justify-content: center;
    }
    
    .track-info-small {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Animation de rotation pour le bouton play */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.playing .track-play-btn {
    animation: pulse 2s infinite;
}

/* Animation pour le badge preview */
@keyframes badge-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.preview-badge {
    animation: badge-pulse 2s infinite;
}

/* Styles pour le visualiseur audio spectre */
.audio-visualizer {
    flex: 1;
    max-width: 300px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.spectrum-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    height: 30px;
    gap: 2px;
}

.spectrum-bar {
    flex: 1;
    min-width: 3px;
    background: linear-gradient(to top, #4CAF50, #8BC34A);
    border-radius: 2px 2px 0 0;
    transition: height 0.1s ease;
}

/* Responsive design pour le visualiseur */
@media (max-width: 1024px) {
    .audio-visualizer {
        max-width: 250px;
        margin: 0 15px;
    }
}

@media (max-width: 768px) {
    .audio-visualizer {
        max-width: 200px;
        margin: 0 10px;
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .player-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .audio-visualizer {
        max-width: 100%;
        height: 35px;
        margin: 5px 0;
    }
    
    .spectrum-bars {
        height: 25px;
    }
    
    .spectrum-bar {
        min-width: 2px;
    }
}

/* Styles pour le bouton de partage */
.share-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.share-btn .material-icons {
    font-size: 20px;
}

/* Adaptation responsive */
@media (max-width: 768px) {
    .content-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .share-btn {
        margin: 5px 0;
        width: 100%;
        justify-content: center;
    }
}