/**
 * WP Media Player - Player Styles
 */

:root {
    --wpmp-primary-color: #667eea;
    --wpmp-primary-dark: #5568d3;
    --wpmp-text-color: #333;
    --wpmp-border-color: #e0e0e0;
    --wpmp-bg-light: #f8f9fa;
}

.wpmp-player-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wpmp-player-header {
    background: var(--wpmp-primary-color);
    color: white;
    padding: 15px 20px;
}

.wpmp-playlist-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.wpmp-player-main {
    padding: 0;
    background: white;
}

.wpmp-player-display {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    max-height: 280px;
    width: 100%;
}

.wpmp-media-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wpmp-audio-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.wpmp-player-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--wpmp-primary-color) 0%, var(--wpmp-primary-dark) 100%);
    color: white;
}

.wpmp-player-info {
    text-align: center;
    padding: 20px;
}

.wpmp-current-file {
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
    max-width: 300px;
}

.wpmp-player-controls {
    background: var(--wpmp-primary-color);
    border-radius: 0;
    padding: 15px 20px;
    border-top: none;
}

.wpmp-progress-container {
    margin-bottom: 12px;
}

.wpmp-progress-bar {
    position: relative;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 6px;
    overflow: visible;
}

.wpmp-progress-bar.dragging .wpmp-progress-fill {
    background: white;
}

.wpmp-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.wpmp-progress-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s;
}

.wpmp-progress-bar:hover .wpmp-progress-handle {
    opacity: 1;
}

.wpmp-time-display {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

.wpmp-controls-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.wpmp-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    color: white;
}

.wpmp-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.wpmp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wpmp-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.wpmp-btn.muted {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.wpmp-icon {
    display: inline-block;
    line-height: 1;
}

.wpmp-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: white;
}

.wpmp-volume-slider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.wpmp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.wpmp-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.wpmp-btn-fullscreen {
    margin-left: auto;
}

.wpmp-player-container.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    background: black !important;
}

.wpmp-player-container.fullscreen .wpmp-player-header {
    display: none !important;
}

.wpmp-player-container.fullscreen .wpmp-player-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

.wpmp-player-container.fullscreen .wpmp-player-display {
    flex: 1 !important;
    min-height: auto !important;
    max-height: none !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
}

.wpmp-player-container.fullscreen .wpmp-player-controls {
    flex-shrink: 0 !important;
    position: absolute !important;
    bottom: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 15px 20px !important;
    z-index: 100000 !important;
}

.wpmp-player-container.fullscreen .wpmp-playlist-container {
    display: none !important;
}

.wpmp-playlist-container {
    background: var(--wpmp-primary-color);
    padding: 15px 20px;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
}

.wpmp-playlist-container h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.wpmp-files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpmp-files-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpmp-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.wpmp-file-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.wpmp-file-item.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.wpmp-file-link {
    flex: 1;
    color: white !important;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    word-break: break-word;
}

.wpmp-file-link:hover {
    text-decoration: underline;
}

.wpmp-file-size {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.wpmp-file-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wpmp-file-download:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .wpmp-player-container {
        max-width: 100%;
        margin: 15px 0;
        border-radius: 8px;
    }

    .wpmp-player-display {
        min-height: 180px;
        max-height: 220px;
    }

    .wpmp-player-main {
        padding: 0;
    }

    .wpmp-controls-buttons {
        gap: 6px;
    }

    .wpmp-btn {
        padding: 6px 8px;
        font-size: 14px;
        min-width: 32px;
        height: 32px;
    }

    .wpmp-volume-container {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }

    .wpmp-volume-slider {
        flex: 1;
    }

    .wpmp-playlist-container {
        max-height: 250px;
        padding: 12px 15px;
    }

    .wpmp-file-item {
        flex-wrap: wrap;
        padding: 6px 8px;
    }

    .wpmp-file-download {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .wpmp-file-link {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .wpmp-player-header {
        padding: 12px 15px;
    }

    .wpmp-playlist-title {
        font-size: 14px;
    }

    .wpmp-player-display {
        min-height: 150px;
        max-height: 180px;
    }

    .wpmp-controls-buttons {
        gap: 4px;
    }

    .wpmp-btn {
        padding: 5px 6px;
        font-size: 12px;
        min-width: 28px;
        height: 28px;
    }

    .wpmp-time-display {
        font-size: 10px;
    }

    .wpmp-playlist-container {
        padding: 10px 12px;
        max-height: 200px;
    }

    .wpmp-file-item {
        padding: 5px 6px;
    }

    .wpmp-file-size {
        font-size: 10px;
    }

    .wpmp-file-link {
        font-size: 11px;
    }
}

.wpmp-playlist-container::-webkit-scrollbar {
    width: 6px;
}

.wpmp-playlist-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.wpmp-playlist-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.wpmp-playlist-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
