/* ==========================================================================
   chatbot_v2 AI Chat — Frontend Modern Glassmorphic Stylesheet
   ========================================================================== */

/* Core Chat Wrapper Config */
.chatbot_v2-chat-widget {
    --pv-primary: #6C63FF;
    --pv-secondary: #00D9FF;
    --pv-height: 600px;
    --pv-radius: 16px;
    --pv-font-size: 14px;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: var(--pv-font-size);
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    border-radius: var(--pv-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: var(--pv-height);
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ==========================================================================
   THEME STYLING
   ========================================================================== */

/* DARK THEME (Aurora Space Glassmorphism) */
.chatbot_v2-theme-dark {
    background: linear-gradient(135deg, #09090e 0%, #11111f 100%);
    color: #f1f5f9;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.chatbot_v2-theme-dark .pv-chat-header {
    background: rgba(17, 17, 27, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.chatbot_v2-theme-dark .pv-chat-messages {
    background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.1) 0%, transparent 55%),
        #09090e;
}

.chatbot_v2-theme-dark .pv-msg-bot .pv-msg-bubble {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chatbot_v2-theme-dark .pv-msg-user .pv-msg-bubble {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35), 0 2px 8px rgba(217, 70, 239, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot_v2-theme-dark .pv-chat-input-area {
    background: rgba(9, 9, 14, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chatbot_v2-theme-dark .pv-chat-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.chatbot_v2-theme-dark .pv-chat-input:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.chatbot_v2-theme-dark .pv-lang-select {
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot_v2-theme-dark .pv-lang-select option {
    background: #09090e;
    color: #cbd5e1;
}

.chatbot_v2-theme-dark .pv-powered {
    color: rgba(255, 255, 255, 0.25);
    background: rgba(9, 9, 14, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Voice overlay dark overrides consolidated below */

.chatbot_v2-theme-dark .pv-audio-player {
    background: rgba(17, 17, 27, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
}

/* LIGHT THEME (Pristine Pearlescent Glassmorphism) */
.chatbot_v2-theme-light {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #0f172a;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.06), 0 10px 25px rgba(0, 0, 0, 0.03);
}

.chatbot_v2-theme-light .pv-chat-header {
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(10px);
}

.chatbot_v2-theme-light .pv-chat-messages {
    background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        #f8fafc;
}

.chatbot_v2-theme-light .pv-msg-bot .pv-msg-bubble {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.08);
    color: #1e293b;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.03), 0 2px 4px rgba(0, 0, 0, 0.01);
}

.chatbot_v2-theme-light .pv-msg-user .pv-msg-bubble {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chatbot_v2-theme-light .pv-chat-input-area {
    background: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(99, 102, 241, 0.08);
}

.chatbot_v2-theme-light .pv-chat-input {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.12);
    color: #0f172a;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.chatbot_v2-theme-light .pv-chat-input:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.01);
}

.chatbot_v2-theme-light .pv-lang-select {
    background: rgba(241, 245, 249, 0.8);
    color: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.chatbot_v2-theme-light .pv-powered {
    color: rgba(15, 23, 42, 0.4);
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(99, 102, 241, 0.06);
}

/* Voice overlay light overrides consolidated below */

.chatbot_v2-theme-light .pv-audio-player {
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(15px);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.pv-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-shrink: 0;
    z-index: 10;
}

.pv-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pv-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pv-avatar img,
.pv-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Online Pulse Dot */
.pv-status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 11px;
    height: 11px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid currentColor;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: pvStatusPulse 2s infinite;
}

@keyframes pvStatusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.chatbot_v2-theme-dark .pv-status-dot {
    border-color: #0f0f1a;
}

.chatbot_v2-theme-light .pv-status-dot {
    border-color: #ffffff;
}

.pv-header-info h4 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
}

.chatbot_v2-theme-dark .pv-header-info h4 {
    color: #ffffff !important;
}

.chatbot_v2-theme-light .pv-header-info h4 {
    color: #0f172a !important;
}

.pv-status-text {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
}

.pv-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pv-lang-select {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.pv-btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: transparent;
    color: inherit;
    opacity: 0.65;
}

.pv-btn-icon:hover {
    opacity: 1;
    background: rgba(108, 99, 255, 0.12);
    color: var(--pv-primary);
    transform: scale(1.05);
}

.pv-btn-icon:active {
    transform: scale(0.95);
}

/* Audio toggle — active state (want_audio = true) */
.pv-audio-toggle.active {
    opacity: 1;
    color: var(--pv-primary);
    background: rgba(108, 99, 255, 0.15);
    box-shadow: 0 0 0 2px var(--pv-primary);
}

.pv-audio-toggle {
    transition: all 0.2s ease, box-shadow 0.2s ease;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */
.pv-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.pv-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.pv-property-selector::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pv-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 4px;
}

.pv-property-selector::-webkit-scrollbar-thumb {
    background: var(--pv-primary, #6C63FF);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.pv-chat-messages::-webkit-scrollbar-track,
.pv-property-selector::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.1);
    border-radius: 6px;
}

/* Slide Up and Fade In animation for messages */
.pv-message {
    display: flex;
    gap: 10px;
    max-width: 82%;
    opacity: 0;
    transform: translateY(15px);
    animation: pvSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pvSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pv-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.pv-msg-bot {
    align-self: flex-start;
}

.pv-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    align-self: flex-end;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.pv-msg-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Custom Speech Bubble Rounding */
.pv-msg-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 0.90rem;
    box-sizing: border-box;
    line-height: 1.5;
}

.pv-msg-user .pv-msg-bubble {
    border-bottom-right-radius: 4px;
}

.pv-msg-bot .pv-msg-bubble {
    border-bottom-left-radius: 4px;
}

.pv-msg-time {
    font-size: 0.68rem;
    opacity: 0.45;
    margin-top: 6px;
    display: block;
}

.pv-msg-user .pv-msg-time {
    text-align: right;
    margin-right: 2px;
}

.pv-msg-bot .pv-msg-time {
    text-align: left;
    margin-left: 2px;
}

/* Audio in message button */
.pv-msg-audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pv-msg-audio-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.chatbot_v2-theme-light .pv-msg-audio-btn {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
}

.chatbot_v2-theme-light .pv-msg-audio-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   TYPING INDICATOR
   ========================================================================== */
.pv-typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 20px 14px;
}

.pv-typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    align-self: flex-end;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.pv-typing-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pv-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot_v2-theme-light .pv-typing-dots {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pv-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pv-primary);
    animation: pvBounce 1.4s infinite ease-in-out;
}

.pv-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.pv-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pvBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ==========================================================================
   INPUT PANEL ZONE
   ========================================================================== */
.pv-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 16px 20px;
    flex-shrink: 0;
}

.pv-input-wrap {
    flex: 1;
}

.pv-chat-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 24px;
    font-family: inherit;
    font-size: var(--pv-font-size);
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    max-height: 120px;
    min-height: 48px;
    line-height: 1.4;
    box-sizing: border-box;
    overscroll-behavior: contain;
}

.pv-input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
}

/* Send Button Overhaul */
.pv-send-btn {
    background: var(--pv-primary) !important;
    color: #ffffff !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.25);
}

.pv-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(108, 99, 255, 0.4);
}

.pv-send-btn:active {
    transform: scale(0.95);
}

/* Voice Recording Button */
.pv-voice-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    opacity: 0.7;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-voice-btn:hover {
    opacity: 1;
    background: rgba(108, 99, 255, 0.1);
    color: var(--pv-primary);
    transform: scale(1.05);
}

.pv-voice-btn.recording {
    background: #ef4444 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    animation: pvPulse 1.5s infinite;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

@keyframes pvPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* ==========================================================================
   VOICE RECORDING OVERLAY (BOTTOM-DOCKED CAPSULE MOCKUP DESIGN)
   ========================================================================== */
.pv-voice-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: auto;
    min-height: 180px;
    z-index: 20;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0 0 var(--pv-radius) var(--pv-radius);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
    animation: pvSlideUpOverlay 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes pvSlideUpOverlay {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chatbot_v2-theme-dark .pv-voice-overlay {
    background: rgba(9, 9, 14, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 45px rgba(0, 0, 0, 0.15);
}

.chatbot_v2-theme-light .pv-voice-overlay {
    background: rgb(255 255 255 / 82%);
    border-top: 1px solid rgba(99, 102, 241, 0.06);
    box-shadow: 0 -10px 30px rgba(99, 102, 241, 0.02);
}

.pv-voice-recording {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100%;
}

/* Physical recording waves - Custom Lime Green from Mockup */
.pv-voice-wave-anim {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 48px;
}

.pv-voice-wave-anim span {
    width: 4px;
    height: 8px;
    background: #6c63ff;
    border-radius: 3px;
    animation: pvWave 1.2s ease-in-out infinite;
}

.pv-voice-wave-anim span:nth-child(1) {
    animation-delay: 0.1s;
}

.pv-voice-wave-anim span:nth-child(2) {
    animation-delay: 0.3s;
}

.pv-voice-wave-anim span:nth-child(3) {
    animation-delay: 0.5s;
}

.pv-voice-wave-anim span:nth-child(4) {
    animation-delay: 0.7s;
}

.pv-voice-wave-anim span:nth-child(5) {
    animation-delay: 0.9s;
}

.pv-voice-wave-anim span:nth-child(6) {
    animation-delay: 0.7s;
}

.pv-voice-wave-anim span:nth-child(7) {
    animation-delay: 0.5s;
}

.pv-voice-wave-anim span:nth-child(8) {
    animation-delay: 0.3s;
}

.pv-voice-wave-anim span:nth-child(9) {
    animation-delay: 0.1s;
}

.pv-voice-wave-anim span:nth-child(10) {
    animation-delay: 0.2s;
}

@keyframes pvWave {

    0%,
    100% {
        height: 8px;
        opacity: 0.6;
    }

    50% {
        height: 38px;
        opacity: 1;
    }
}

.pv-voice-timer {
    font-size: 2.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    margin: 2px 0;
}

.chatbot_v2-theme-dark .pv-voice-timer {
    color: #ffffff;
}

.chatbot_v2-theme-light .pv-voice-timer {
    color: #0f172a;
}

.pv-voice-controls {
    display: flex;
    gap: 20px;
    margin-top: 4px;
}

.pv-voice-cancel,
.pv-voice-send {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot_v2-theme-dark .pv-voice-cancel {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.chatbot_v2-theme-light .pv-voice-cancel {
    background: #ffe4e6;
    /* Soft pink close bubble mockup */
    color: #ef4444;
}

.pv-voice-cancel:hover {
    transform: scale(1.08);
}

.pv-voice-cancel:active {
    transform: scale(0.95);
}

.chatbot_v2-theme-dark .pv-voice-send {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.chatbot_v2-theme-light .pv-voice-send {
    background: #6c63ff;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(132, 204, 22, 0.35);
}

.pv-voice-send:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(132, 204, 22, 0.5);
}

.pv-voice-send:active {
    transform: scale(0.95);
}

/* ==========================================================================
   MINI AUDIO PLAYER OVERLAY
   ========================================================================== */
.pv-audio-player {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    flex-shrink: 0;
    animation: pvSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pv-audio-play-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--pv-primary);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(108, 99, 255, 0.2);
}

.pv-audio-play-btn:hover {
    transform: scale(1.08);
}

.pv-audio-wave {
    display: flex;
    align-items: center;
    gap: 2.5px;
    flex: 1;
}

.pv-audio-wave span {
    width: 3px;
    height: 16px;
    background: var(--pv-primary);
    border-radius: 2px;
    opacity: 0.35;
}

.pv-audio-wave.playing span {
    animation: pvWave 0.8s ease-in-out infinite;
}

.pv-audio-time {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
}

.pv-audio-close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.pv-audio-close:hover {
    opacity: 1;
}

/* ==========================================================================
   PROPERTY SELECTOR TAGS
   ========================================================================== */
.pv-property-selector {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 20px;
    gap: 8px;
    border-top: 1px solid rgba(128, 128, 128, 0.12);
    max-height: 120px;
    overflow-y: auto;
}

.pv-property-btn {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--pv-primary);
    background: transparent;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.pv-property-btn:hover {
    background: var(--pv-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(108, 99, 255, 0.25);
}

.pv-property-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   POWERED BY
   ========================================================================== */
.pv-powered {
    text-align: center;
    font-size: 0.65rem;
    padding: 8px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 700;
}

/* ==========================================================================
   FLOATING BUTTON / ACTION WIDGET
   ========================================================================== */
.chatbot_v2-floating-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Floating Action Button overrides */
.chatbot_v2-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--pv-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    z-index: 2;
    animation: pvFloatFAB 3.5s ease-in-out infinite;
}

.chatbot_v2-fab:hover {
    transform: scale(1.08) rotate(4deg);
    box-shadow: 0 12px 30px rgba(108, 99, 255, 0.45);
}

.chatbot_v2-fab svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.2;
}

/* Slide and Scale floating chat frame */
.chatbot_v2-chat-widget.pv-is-floating {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 390px;
    max-width: calc(100vw - 40px);
    height: var(--pv-height);
    max-height: calc(100vh - 120px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.chatbot_v2-floating-wrapper.active .chatbot_v2-chat-widget.pv-is-floating {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot_v2-floating-wrapper.active .pv-fab-icon-chat {
    display: none;
}

.chatbot_v2-floating-wrapper.active .pv-fab-icon-close {
    display: block !important;
}

/* ==========================================================================
   ERROR MESSAGE
   ========================================================================== */
.chatbot_v2-error {
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--pv-radius);
    color: #991b1b;
    font-size: 0.88rem;
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE ADAPTIVE DRAWER)
   ========================================================================== */
@media (max-width: 768px) {
    .chatbot_v2-chat-widget {
        border-radius: 0;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
    }

    .pv-message {
        max-width: 90%;
    }

    .pv-chat-header {
        padding: 14px 16px;
    }

    .pv-chat-input-area {
        padding: 12px 16px;
    }

    /* Mobile Floating Adjustments */
    .chatbot_v2-floating-wrapper {
        bottom: 20px;
        right: 20px;
    }

    .chatbot_v2-chat-widget.pv-is-floating {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        height: 88vh !important;
        max-height: 88vh !important;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .chatbot_v2-floating-wrapper.active .chatbot_v2-chat-widget.pv-is-floating {
        transform: translateY(0);
    }

    .chatbot_v2-floating-wrapper.active .chatbot_v2-fab {
        display: none !important;
    }
}

/* ==========================================================================
   ANIMATED ROBOT SVG ICON & AVATAR
   ========================================================================== */
.pv-robot-svg {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Antenna Pulsing Glow */
@keyframes pvAntennaPulse {

    0%,
    100% {
        opacity: 0.75;
        filter: drop-shadow(0 0 2px var(--pv-secondary)) brightness(1.2);
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px var(--pv-secondary)) brightness(1.5);
    }
}

.pv-antenna-glow {
    animation: pvAntennaPulse 1.5s infinite ease-in-out;
}

/* Expanding Signal Pulse Ring wave */
@keyframes pvPulseRing {
    0% {
        transform: scale(0.5);
        opacity: 1;
        stroke-width: 1.5;
    }

    100% {
        transform: scale(2.6);
        opacity: 0;
        stroke-width: 0.5;
    }
}

.pv-antenna-pulse-ring {
    transform-origin: 24px 4px;
    animation: pvPulseRing 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Robot Eyes Blink Animation */
@keyframes pvBlink {

    0%,
    90%,
    100% {
        transform: scaleY(1);
    }

    95% {
        transform: scaleY(0.1);
    }
}

.pv-robot-eye {
    transform-origin: center;
    animation: pvBlink 4s infinite ease-in-out;
    filter: drop-shadow(0 0 3px var(--pv-secondary));
}

.pv-robot-eye.left {
    transform-origin: 18px 23px;
}

.pv-robot-eye.right {
    transform-origin: 30px 23px;
}

/* Breathing Status Badge on Mascot */
@keyframes pvBadgeBreathe {

    0%,
    100% {
        opacity: 0.85;
        transform: scale(0.9);
        fill: #10b981;
        filter: drop-shadow(0 0 1px #10b981);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
        fill: #059669;
        filter: drop-shadow(0 0 5px #10b981);
    }
}

.pv-robot-badge {
    transform-origin: 38px 35px;
    animation: pvBadgeBreathe 2.5s ease-in-out infinite;
}

/* Cute Smile Micro-pulsing */
@keyframes pvSmilePulse {

    0%,
    100% {
        opacity: 0.9;
        stroke: #ffffff;
    }

    50% {
        opacity: 1;
        stroke: var(--pv-secondary);
    }
}

.pv-robot-smile {
    animation: pvSmilePulse 3s infinite ease-in-out;
}

/* Wiggle head on FAB hover */
.chatbot_v2-fab:hover .pv-robot-svg {
    animation: pvRobotWiggle 0.6s ease-in-out infinite alternate;
}

@keyframes pvRobotWiggle {
    0% {
        transform: translateY(0) rotate(-5deg) scale(1.08);
    }

    100% {
        transform: translateY(-4px) rotate(5deg) scale(1.08);
    }
}

/* Ensure the robot icon fits nicely in message avatars and headers */
.pv-avatar .pv-robot-svg,
.pv-msg-avatar .pv-robot-svg,
.pv-typing-avatar .pv-robot-svg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: scale(1.05);
}

/* Ensure the robot icon has the correct 44px size inside the FAB button */
.chatbot_v2-fab .pv-fab-icon-chat {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot_v2-fab .pv-fab-icon-chat .pv-robot-svg {
    width: 50px !important;
    height: 50px !important;
}

/* ==========================================================================
   FLOATING GREETING BUBBLE TOOLTIP
   ========================================================================== */
.chatbot_v2-fab-bubble {
    position: absolute;
    bottom: 78px;
    right: 5px;
    background: rgba(15, 23, 42, 0.93);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    animation: pvFloatFAB 3.5s ease-in-out infinite;
    animation-delay: 0.15s;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.chatbot_v2-fab-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.93);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
}

.chatbot_v2-fab-bubble-text {
    line-height: 1;
}

.chatbot_v2-fab-bubble-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.chatbot_v2-fab-bubble-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.chatbot_v2-fab-bubble-close:active {
    transform: scale(0.9);
}

/* Floating animation keyframes */
@keyframes pvFloatFAB {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Hide float bubble instantly when widget is active or open */
.chatbot_v2-floating-wrapper.active .chatbot_v2-fab-bubble {
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.85);
    pointer-events: none;
}

@media (max-width: 768px) {
    .chatbot_v2-fab-bubble {
        bottom: 84px;
        right: 10px;
        font-size: 0.84rem;
        padding: 8px 14px;
    }
}

/* ==========================================================================
   QUICK SUGGESTION CHIPS (after property intro)
   ========================================================================== */

.pv-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px 12px 12px;
    animation: pv-fade-in 0.3s ease;
}

@keyframes pv-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pv-suggestion-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--pv-primary);
    background: transparent;
    color: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.pv-suggestion-chip:hover {
    background: var(--pv-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.4);
}

.chatbot_v2-theme-dark .pv-suggestion-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(108, 99, 255, 0.35);
    color: #cbd5e1;
}

.chatbot_v2-theme-dark .pv-suggestion-chip:hover {
    background: var(--pv-primary);
    border-color: var(--pv-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(108, 99, 255, 0.5);
}

.chatbot_v2-theme-light .pv-suggestion-chip {
    background: rgba(108, 99, 255, 0.05);
    border-color: rgba(108, 99, 255, 0.25);
    color: #4f46e5;
}

.chatbot_v2-theme-light .pv-suggestion-chip:hover {
    background: var(--pv-primary);
    border-color: var(--pv-primary);
    color: #ffffff;
}

/* ==========================================================================
   PROPERTY SELECTOR & PILLS
   ========================================================================== */

.pv-property-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
    max-height: 100px;
    overflow-y: auto;
    background: transparent;
}

.pv-property-selector::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.pv-property-selector::-webkit-scrollbar-thumb {
    background: var(--pv-primary, #6C63FF);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.pv-property-selector::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.1);
    border-radius: 6px;
}

/* Base pill button */
.pv-property-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--pv-primary);
    background: transparent;
    color: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.2px;
    outline: none;
}

.pv-property-btn:hover {
    background: var(--pv-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}

.pv-property-btn.active {
    background: var(--pv-primary);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.5);
    transform: none;
}

/* Dark theme overrides */
.chatbot_v2-theme-dark .pv-property-selector {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.chatbot_v2-theme-dark .pv-property-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.chatbot_v2-theme-dark .pv-property-btn:hover,
.chatbot_v2-theme-dark .pv-property-btn.active {
    background: var(--pv-primary);
    border-color: var(--pv-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.5);
}

/* Light theme overrides */
.chatbot_v2-theme-light .pv-property-selector {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.chatbot_v2-theme-light .pv-property-btn {
    background: rgba(108, 99, 255, 0.06);
    border-color: rgba(108, 99, 255, 0.2);
    color: #4f46e5;
}

.chatbot_v2-theme-light .pv-property-btn:hover,
.chatbot_v2-theme-light .pv-property-btn.active {
    background: var(--pv-primary);
    border-color: var(--pv-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.28);
}

/* ============================
   PROPERTY SWITCH DIVIDER
   Shown in chat when user selects a property
   ============================ */
.pv-property-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 8px 10px;
    opacity: 0;
    animation: pvFadeIn 0.4s ease forwards;
}

.pv-property-divider-line {
    flex: 1;
    height: 1px;
    background: var(--pv-border, rgba(108, 99, 255, 0.25));
}

.pv-property-divider-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--pv-primary);
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
}

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

/* Audio playing state */
.pv-msg-audio-btn.playing {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.pv-audio-playing {
    font-weight: 600;
    font-size: 11px;
    margin-left: 4px;
}