/* Blog Audio Reader Styles - Single Line Design */
.blog-audio-player {
    max-width: 100%;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Oxygen", "Ubuntu", sans-serif;
    transition: all 0.3s ease;
}

.blog-audio-player:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.audio-player-wrapper {
    background: #ffffff;
    padding: 16px 20px;
}

/* Modern Gradient Style */
.player-style-modern .audio-player-wrapper {
    background: linear-gradient(135deg, var(--player-color, #4F46E5) 0%, #7c3aed 100%);
    color: #ffffff;
}

.player-style-modern .audio-title,
.player-style-modern .audio-subtitle,
.player-style-modern .audio-time-info {
    color: #ffffff;
}

.player-style-modern .audio-icon-box {
    background: rgba(255, 255, 255, 0.2);
}

.player-style-modern .audio-wave-icon {
    color: #ffffff;
}

.player-style-modern .audio-progress-track {
    background: rgba(255, 255, 255, 0.25);
}

.player-style-modern .audio-progress-filled {
    background: #ffffff;
}

.player-style-modern .audio-stop-button {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.player-style-modern .audio-speed-button {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.player-style-modern .audio-speed-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Minimal Style */
.player-style-minimal .audio-player-wrapper {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}

/* Classic Style */
.player-style-classic .audio-player-wrapper {
    background: #fffbeb;
    border: 2px solid #fbbf24;
}

.player-style-classic .audio-icon-box {
    background: #fbbf24;
}

/* Glassmorphism Style */
.player-style-glassmorphism .audio-player-wrapper {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* SINGLE LINE LAYOUT */
.audio-header-section {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.audio-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--player-color, #4F46E5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.audio-wave-icon {
    color: #ffffff;
    width: 22px;
    height: 22px;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.audio-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.audio-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    display: none; /* Hide on single line for space */
}

/* Controls Section - All in one line */
.audio-controls-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.audio-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--player-color, #4F46E5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    position: relative;
}

.audio-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

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

.audio-play-button {
    width: 42px;
    height: 42px;
}

.audio-play-button svg {
    width: 20px;
    height: 20px;
}

.icon-play,
.icon-pause {
    pointer-events: none;
}

.audio-stop-button {
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
    width: 38px;
    height: 38px;
}

.audio-stop-button svg {
    width: 16px;
    height: 16px;
}

/* Progress Section - Compact */
.audio-progress-section {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-progress-track {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: height 0.2s;
}

.audio-progress-track:hover {
    height: 8px;
}

.audio-progress-filled {
    height: 100%;
    width: 0%;
    background: var(--player-color, #4F46E5);
    border-radius: 999px;
    transition: width 0.15s linear;
    position: relative;
}

.audio-progress-filled::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--player-color, #4F46E5);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

.audio-progress-track:hover .audio-progress-filled::after {
    opacity: 1;
}

.audio-time-info {
    display: flex;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    white-space: nowrap;
}

.time-current::after {
    content: "/";
    margin: 0 2px;
    color: #9ca3af;
}

/* Speed Control - Compact */
.audio-speed-wrapper {
    position: relative;
    flex-shrink: 0;
}

.audio-speed-button {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-speed-button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.speed-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 6px;
    display: none;
    min-width: 80px;
    z-index: 1000;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.speed-dropdown.show {
    display: block;
}

.speed-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.speed-item:hover {
    background: #f3f4f6;
}

.speed-item.active {
    background: var(--player-color, #4F46E5);
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .audio-player-wrapper {
        padding: 14px 16px;
    }
    
    .audio-header-section {
        gap: 10px;
    }
    
    .audio-icon-box {
        width: 38px;
        height: 38px;
    }
    
    .audio-wave-icon {
        width: 20px;
        height: 20px;
    }
    
    .audio-title {
        font-size: 13px;
    }
    
    .audio-controls-section {
        gap: 8px;
    }
    
    .audio-play-button,
    .audio-btn {
        width: 38px;
        height: 38px;
    }
    
    .audio-stop-button {
        width: 36px;
        height: 36px;
    }
    
    .audio-time-info {
        font-size: 10px;
    }
    
    .audio-speed-button {
        padding: 6px 10px;
        min-width: 50px;
        height: 36px;
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .audio-player-wrapper {
        padding: 12px 14px;
    }
    
    .audio-info {
        display: none; /* Hide text label on very small screens */
    }
    
    .audio-progress-section {
        min-width: 80px;
    }
    
    .audio-time-info {
        display: none; /* Hide times on very small screens */
    }
}

@media (max-width: 480px) {
    .audio-controls-section {
        gap: 6px;
    }
    
    .audio-header-section {
        gap: 8px;
    }
    
    .audio-icon-box {
        width: 36px;
        height: 36px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .audio-player-wrapper {
        background: #1f2937;
    }
    
    .audio-title {
        color: #f9fafb;
    }
    
    .audio-subtitle,
    .audio-time-info {
        color: #9ca3af;
    }
    
    .audio-progress-track {
        background: #374151;
    }
    
    .player-style-minimal .audio-player-wrapper {
        background: #111827;
        border-color: #374151;
    }
    
    .speed-dropdown {
        background: #374151;
    }
    
    .speed-item {
        color: #f9fafb;
    }
    
    .speed-item:hover {
        background: #4b5563;
    }
    
    .audio-speed-button {
        background: rgba(255, 255, 255, 0.1);
        color: #f9fafb;
    }
    
    .audio-stop-button {
        background: rgba(255, 255, 255, 0.1);
        color: #f9fafb;
    }
}