/**
 * Public styles for Interactive Audio Treatment plugin
 */

/* Interactive Audio Section */
.interactive-audio-section {
    position: relative;
    padding: 20px;
    margin: 20px 0;
    transition: background-color 0.3s ease;
}

/* Audio Trigger Styling */
.audio-trigger {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.audio-trigger:hover {
    opacity: 0.9;
}

.audio-trigger:active {
    transform: scale(0.98);
}

/* Animation classes for triggers */
.audio-trigger.fade-in {
    animation: fadeIn 1s ease-in-out;
}

.audio-trigger.scale-in {
    animation: scaleIn 0.5s ease-out;
}

.audio-trigger.pulse {
    animation: pulse 2s infinite;
}

/* Audio Player Container */
.audio-player-container {
    width: 100%;
    max-width: 500px;
    margin: 20px 0;
    border-radius: 5px;
    overflow: hidden;
}

/* Default Theme */
.audio-player-container.theme-default {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px;
}

/* Minimal Theme */
.audio-player-container.theme-minimal {
    background: transparent;
    border: none;
}

/* Round Theme */
.audio-player-container.theme-round .custom-audio-controls {
    border-radius: 30px;
    overflow: hidden;
}

.audio-player-container.theme-round .play-pause-btn,
.audio-player-container.theme-round .volume-btn {
    border-radius: 50%;
}

/* Hide native audio player when using custom controls */
.audio-player-container .audio-player {
    width: 100%;
}

.audio-player-container .custom-audio-controls + .audio-player {
    display: none;
}

/* Custom Audio Controls */
.custom-audio-controls {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
}

/* Play/Pause Button */
.play-pause-btn {
    background: #2271b1;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.play-pause-btn:hover {
    background: #135e96;
}

.play-pause-btn .pause-icon {
    display: none;
}

.play-pause-btn.playing .play-icon {
    display: none;
}

.play-pause-btn.playing .pause-icon {
    display: inline;
}

/* Progress Bar */
.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin-bottom: 5px;
}

.progress-indicator {
    height: 100%;
    width: 0;
    background: #2271b1;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 12px;
    color: #666;
}

/* Volume Controls */
.volume-container {
    display: flex;
    align-items: center;
}

.volume-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.volume-slider {
    width: 80px;
    height: 5px;
    -webkit-appearance: none;
    background: #ddd;
    outline: none;
    border-radius: 3px;
}

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

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #2271b1;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .custom-audio-controls {
        flex-wrap: wrap;
    }
    
    .volume-container {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
}
