/* Advanced Audio Player Styles - Minimalist Design */

.advanced-audio-player {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Play/Pause Button */
.player-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary, #52382f);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(82, 56, 47, 0.2);
}

.player-play-btn:hover {
    background: var(--color-primary-dark, #3d2a23);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(82, 56, 47, 0.3);
}

.player-play-btn:active {
    transform: scale(0.98);
}

.player-play-btn i {
    font-size: 18px;
    margin-left: 2px; /* Slight adjustment for play icon centering */
}

/* Progress Bar */
.player-progress-container {
    position: relative;
    height: 6px;
    background: var(--bs-secondary-bg);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.player-progress-container:hover {
    height: 8px;
}

.player-progress-bar {
    height: 100%;
    background: var(--color-primary, #52382f);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Time Display */
.player-time {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}

.player-time-placeholder {
    height: 1.2rem; /* Approximate height of player-time */
}

/* Control Sliders */
.player-control-group {
    margin-bottom: 1rem;
}

.player-control-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-control-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary, #52382f);
    background: var(--bs-secondary-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Key Selector Dropdown */
.player-key-select {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: all 0.2s ease;
}

.player-key-select:focus {
    border-color: var(--color-primary, #52382f);
    box-shadow: 0 0 0 0.2rem rgba(82, 56, 47, 0.15);
    outline: none;
}

.player-key-select:hover {
    border-color: var(--color-primary, #52382f);
}

.player-key-select option {
    padding: 0.5rem;
}

.player-key-select option:disabled {
    color: var(--bs-secondary-color);
    font-style: italic;
}

/* Range Sliders */
.player-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bs-secondary-bg);
    outline: none;
    transition: background 0.3s;
}

.player-slider:hover {
    background: var(--bs-tertiary-bg);
}

.player-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary, #52382f);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(82, 56, 47, 0.3);
    transition: all 0.2s ease;
}

.player-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(82, 56, 47, 0.5);
}

.player-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.player-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary, #52382f);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(82, 56, 47, 0.3);
    transition: all 0.2s ease;
}

.player-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(82, 56, 47, 0.5);
}

/* Volume Control */
.player-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: var(--bs-secondary-bg);
    outline: none;
}

.player-volume-slider:hover {
    height: 8px;
}

.player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary, #52382f);
    cursor: pointer;
}

.player-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary, #52382f);
    cursor: pointer;
    border: none;
}

/* Control Icons */
.player-control-icon {
    font-size: 1.25rem;
    color: var(--bs-secondary-color);
    margin-right: 0.5rem;
}

/* Main Controls Container */
.player-main-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Advanced Controls Toggle */
.player-advanced-toggle {
    background: transparent;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--bs-body-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-advanced-toggle:hover {
    background: var(--bs-secondary-bg);
    border-color: var(--color-primary, #52382f);
}

.player-advanced-toggle i {
    margin-right: 0.5rem;
}

/* Advanced Controls Panel */
.player-advanced-controls {
    padding-top: 1.5rem;
    border-top: 1px solid var(--bs-border-color);
    margin-top: 1.5rem;
}

/* SoundTouch Status Indicator */
#soundtouch-status {
    padding: 0.5rem;
    border-radius: 6px;
    background: var(--bs-secondary-bg);
}

#soundtouch-status .text-success {
    color: #28a745 !important;
}

#soundtouch-status .text-warning {
    color: #ffc107 !important;
}

#soundtouch-mode {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 576px) {
    .advanced-audio-player {
        padding: 16px;
    }
    
    .player-play-btn {
        width: 36px;
        height: 36px;
    }
    
    .player-play-btn i {
        font-size: 16px;
    }
    
    .player-volume-slider {
        width: 80px;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .advanced-audio-player {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .player-progress-container {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .player-slider {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .player-slider:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .player-key-select {
    background: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .player-key-select:focus {
    border-color: var(--color-primary, #52382f);
}

[data-theme="dark"] .player-key-select:hover {
    border-color: var(--color-primary, #52382f);
}

/* Loading state */
.player-loading {
    opacity: 0.6;
    pointer-events: none;
}

.player-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--bs-border-color);
    border-top-color: var(--color-primary, #52382f);
    border-radius: 50%;
    animation: player-spin 0.8s linear infinite;
}

@keyframes player-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
