/* Telegram-style Voice Message Player - LARGER VERSION */
.voice-message-container {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(144, 224, 239, 0.2);
    border-radius: 28px;
    max-width: 500px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.voice-message-container:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(144, 224, 239, 0.5);
    box-shadow: 0 12px 40px rgba(144, 224, 239, 0.2);
}

.voice-play-button {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #90e0ef 0%, #5eead4 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 16px rgba(144, 224, 239, 0.3);
}

.voice-play-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(144, 224, 239, 0.5);
}

.voice-play-button:active {
    transform: scale(0.98);
}

.voice-play-button svg {
    width: 24px;
    height: 24px;
    fill: #0a1929;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.voice-play-button svg.play-icon {
    display: block;
    opacity: 1;
    visibility: visible;
}

.voice-play-button svg.pause-icon {
    display: block;
    opacity: 0;
    visibility: hidden;
}

.voice-play-button.playing svg.play-icon {
    opacity: 0;
    visibility: hidden;
}

.voice-play-button.playing svg.pause-icon {
    opacity: 1;
    visibility: visible;
}

.voice-waveform-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.voice-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 40px;
    cursor: pointer;
    position: relative;
}

.voice-waveform-bar {
    flex: 1;
    min-width: 3px;
    background: rgba(148, 163, 184, 0.4);
    border-radius: 3px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.voice-waveform-bar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--fill-progress, 0%);
    background: linear-gradient(180deg, #90e0ef 0%, #5eead4 100%);
    border-radius: 3px;
    transition: height 0.05s linear;
}

.voice-waveform-bar.active::before {
    height: var(--fill-progress, 100%);
}

.voice-waveform-bar:hover {
    background: rgba(148, 163, 184, 0.6);
}

.voice-time-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.voice-current-time {
    color: #90e0ef;
    font-weight: 600;
}

.voice-duration {
    color: #94a3b8;
}

/* Loading state */
.voice-play-button.loading {
    pointer-events: none;
}

.voice-play-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #0a1929;
    border-top-color: transparent;
    border-radius: 50%;
    animation: voice-spin 0.6s linear infinite;
}

@keyframes voice-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .voice-message-container {
        max-width: 450px;
    }
}

@media (max-width: 480px) {
    .voice-message-container {
        max-width: 100%;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .voice-play-button {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    
    .voice-play-button svg {
        width: 20px;
        height: 20px;
    }
    
    .voice-waveform {
        height: 36px;
        gap: 2px;
    }
    
    .voice-time-info {
        font-size: 12px;
    }
}
