/**
 * Voice Notes CSS - WhatsApp-Style Voice Messages
 * Feature D: The Voice Note Engine
 */

.voice-record-btn {
    position: relative;
    transition: all 0.3s ease;
}

.voice-record-btn.recording {
    background-color: #f44336 !important;
    color: white !important;
    animation: pulse 1.5s infinite;
}

.voice-record-btn.recording svg {
    fill: white;
}

.voice-record-btn.voice-attached {
    background-color: #4caf50 !important;
    color: white !important;
}

.voice-record-btn.voice-attached svg {
    fill: white;
}

.recording-time {
    font-weight: 600;
    margin-left: 5px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.voice-note-preview {
    margin: 10px 0;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voice-note-preview span {
    color: #2e7d32;
    font-weight: 500;
}

.remove-voice-btn {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.remove-voice-btn:hover {
    background: rgba(211, 47, 47, 0.1);
}

.voice-note-bubble {
    margin-top: 15px;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.play-voice-btn {
    background: #4caf50;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.play-voice-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.play-voice-btn:active {
    transform: scale(0.95);
}

.waveform-bar {
    flex: 1;
    height: 4px;
    background: #c8e6c9;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.waveform-progress {
    height: 100%;
    background: #4caf50;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.voice-note-bubble .duration {
    color: #2e7d32;
    font-size: 12px;
    font-weight: 500;
    min-width: 35px;
    text-align: right;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .voice-note-bubble {
        max-width: 100%;
    }
    
    .voice-record-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}



