/* WhatsApp-style Voice Notes & Recording Styles */

/* Voice Note Player Bubble */
.vn-player-bubble {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    min-width: 240px;
    max-width: 310px;
    box-sizing: border-box;
    user-select: none;
    position: relative;
    font-family: 'Outfit', sans-serif;
}

/* User vs Astrologer bubble themes */
.gc-msg-user .vn-player-bubble,
.msg-user .vn-player-bubble,
.vn-player-bubble.bubble-sent {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
}

.gc-msg-astro .vn-player-bubble,
.msg-astro .vn-player-bubble,
.vn-player-bubble.bubble-received {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #fed7aa;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Play/Pause Button */
.vn-play-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    font-size: 1rem;
}

.gc-msg-user .vn-play-btn,
.msg-user .vn-play-btn,
.vn-player-bubble.bubble-sent .vn-play-btn {
    background: #ffffff;
    color: #ea580c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.gc-msg-user .vn-play-btn:hover,
.msg-user .vn-play-btn:hover,
.vn-player-bubble.bubble-sent .vn-play-btn:hover {
    transform: scale(1.06);
    background: #fff8f0;
}

.gc-msg-astro .vn-play-btn,
.msg-astro .vn-play-btn,
.vn-player-bubble.bubble-received .vn-play-btn {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}
.gc-msg-astro .vn-play-btn:hover,
.msg-astro .vn-play-btn:hover,
.vn-player-bubble.bubble-received .vn-play-btn:hover {
    transform: scale(1.06);
}

/* Center Content: Waveform & Details */
.vn-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Sound Waveform Bars */
.vn-waveform-container {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.vn-bars {
    display: flex;
    align-items: center;
    gap: 2.5px;
    width: 100%;
    height: 100%;
}

.vn-bar {
    flex: 1;
    min-width: 2px;
    max-width: 4px;
    border-radius: 99px;
    transition: background 0.15s ease, height 0.15s ease;
}

.gc-msg-user .vn-bar,
.msg-user .vn-bar,
.vn-player-bubble.bubble-sent .vn-bar {
    background: rgba(255, 255, 255, 0.45);
}
.gc-msg-user .vn-bar.played,
.msg-user .vn-bar.played,
.vn-player-bubble.bubble-sent .vn-bar.played {
    background: #ffffff;
}

.gc-msg-astro .vn-bar,
.msg-astro .vn-bar,
.vn-player-bubble.bubble-received .vn-bar {
    background: #cbd5e1;
}
.gc-msg-astro .vn-bar.played,
.msg-astro .vn-bar.played,
.vn-player-bubble.bubble-received .vn-bar.played {
    background: #ea580c;
}

/* Interactive Invisible Range Slider for Scrubbing */
.vn-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 5;
}

/* Footer: Duration & Mic Badge */
.vn-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1;
}

.gc-msg-user .vn-time,
.msg-user .vn-time,
.vn-player-bubble.bubble-sent .vn-time {
    color: rgba(255, 255, 255, 0.9);
}

.gc-msg-astro .vn-time,
.msg-astro .vn-time,
.vn-player-bubble.bubble-received .vn-time {
    color: #64748b;
}

.vn-mic-badge {
    font-size: 0.8rem;
    opacity: 0.85;
}
.gc-msg-user .vn-mic-badge,
.msg-user .vn-mic-badge,
.vn-player-bubble.bubble-sent .vn-mic-badge {
    color: #ffffff;
}
.gc-msg-astro .vn-mic-badge,
.msg-astro .vn-mic-badge,
.vn-player-bubble.bubble-received .vn-mic-badge {
    color: #ea580c;
}

/* ========================================================
   RECORDING INTERFACE (Integrated in Input Bar)
======================================================== */
.btn-voice-record {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}
.btn-voice-record:hover {
    background: #e2e8f0;
    color: #ea580c;
    transform: scale(1.05);
}

.gc-input-bar button.btn-voice-record,
.chat-input-area button.btn-voice-record {
    background: #f1f5f9 !important;
    color: #475569 !important;
    box-shadow: none !important;
    width: 40px !important;
    height: 40px !important;
}
.gc-input-bar button.btn-voice-record:hover,
.chat-input-area button.btn-voice-record:hover {
    background: #fed7aa !important;
    color: #ea580c !important;
}

/* Recording Mode Bar (Replaces normal input text bar) */
.vn-recording-bar {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    background: #fff8f0;
    border: 1.5px solid #fed7aa;
    border-radius: 25px;
    padding: 6px 14px;
    animation: vnSlideIn 0.25s ease-out;
}

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

.vn-rec-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vn-rec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: vnPulse 1.2s infinite;
}

@keyframes vnPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.vn-rec-timer {
    font-family: 'Outfit', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ef4444;
    min-width: 42px;
}

.vn-rec-label {
    flex: 1;
    font-size: 0.88rem;
    color: #78350f;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vn-wave-anim {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 14px;
}

.vn-wave-anim span {
    width: 3px;
    background: #ea580c;
    border-radius: 2px;
    animation: vnWave 0.8s infinite ease-in-out;
}
.vn-wave-anim span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.vn-wave-anim span:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.vn-wave-anim span:nth-child(3) { height: 16px; animation-delay: 0.3s; }
.vn-wave-anim span:nth-child(4) { height: 8px; animation-delay: 0.4s; }
.vn-wave-anim span:nth-child(5) { height: 14px; animation-delay: 0.5s; }

@keyframes vnWave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

.vn-btn-cancel {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vn-btn-cancel:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.vn-btn-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
    transition: all 0.2s;
    flex-shrink: 0;
}
.vn-btn-send:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}
