/* Audio Player Widget Styles */
.audio-player-widget {
    margin-top: 70px;
}

.custom-audio-player {

    border-radius: 15px;
    padding: 25px;
    padding-bottom: 50px;
    border: 1px solid #ff5e14;

    position: relative;
}

.custom-audio-player audio {
    display: none;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-pause-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff5e14;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.play-pause-btn i {
    color: #ffffff;
    font-size: 18px;
    margin-left: 3px;
}

.play-pause-btn.playing i {
    margin-left: 0;
}

.audio-waveform {
    flex: 1;
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
}

.waveform-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.wave-bar {
    flex: 1;
    background: #ff5e14;
    border-radius: 3px;
    min-width: 3px;
    transition: all 0.3s ease;
}

/* Random heights for wave bars */
.wave-bar:nth-child(5n+1) {
    height: 60%;
}

.wave-bar:nth-child(5n+2) {
    height: 80%;
}

.wave-bar:nth-child(5n+3) {
    height: 40%;
}

.wave-bar:nth-child(5n+4) {
    height: 90%;
}

.wave-bar:nth-child(5n+5) {
    height: 50%;
}

.wave-bar:nth-child(3n+1) {
    height: 70%;
}

.wave-bar:nth-child(3n+2) {
    height: 45%;
}

.wave-bar.active {
    background: #c67854;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    width: 0%;
    z-index: 0;
    border-radius: 5px;
    transition: width 0.1s linear;
}

.audio-time {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff5e14;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
}

/* Animation for playing state */
@keyframes wave-pulse {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.3);
    }
}

.custom-audio-player.playing .wave-bar.active {
    animation: wave-pulse 0.8s ease-in-out infinite;
}

.custom-audio-player.playing .wave-bar:nth-child(2n).active {
    animation-delay: 0.1s;
}

.custom-audio-player.playing .wave-bar:nth-child(3n).active {
    animation-delay: 0.2s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-audio-player {
        padding: 20px;
        padding-bottom: 45px;
    }

    .audio-controls {
        gap: 10px;
    }

    .play-pause-btn {
        width: 45px;
        height: 45px;
    }

    .play-pause-btn i {
        font-size: 16px;
    }

    .audio-waveform {
        height: 40px;
    }

    .audio-time {
        font-size: 12px;
        bottom: 12px;
    }
}

@media (max-width: 480px) {
    .waveform-container {
        gap: 1px;
    }

    .wave-bar {
        min-width: 2px;
    }
}