/* Audio Player */
.audio-player {
    margin: calc(var(--spacing-unit) * 3) 0;
    padding: calc(var(--spacing-unit) * 2);
    background: #f8f8f8;
    border-radius: 8px;
    position: relative;
}

.audio-waveform {
    position: relative;
    width: 100%;
    height: 80px;
    margin-bottom: var(--spacing-unit);
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.audio-play-button {
    position: absolute;
    top: calc(var(--spacing-unit) * 2);
    left: calc(var(--spacing-unit) * 2);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.audio-play-button:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.05);
}

.audio-play-button.playing {
    padding-left: 0;
}

.audio-play-button.playing::before {
    content: '⏸';
}

.audio-transcript {
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-unit);
    font-style: italic;
}

.audio-transcript p {
    margin-bottom: 0;
}

.audio-caption {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Waveform Animation */
.audio-player.playing .waveform-canvas {
    animation: pulse 0.3s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.8;
    }
}

/* Progress Bar */
.audio-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.6);
    width: 0%;
    transition: width 0.1s linear;
}

/* Responsive */
@media (max-width: 768px) {
    .audio-player {
        padding: var(--spacing-unit);
    }

    .audio-waveform {
        height: 60px;
    }

    .audio-play-button {
        width: 40px;
        height: 40px;
        font-size: 14px;
        top: var(--spacing-unit);
        left: var(--spacing-unit);
    }

    .audio-transcript {
        font-size: 16px;
    }

    .audio-caption {
        font-size: 12px;
    }
}
