@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

@font-face {
    font-family: Outfit;
    src: url("https://qa.cdn.telenaai.com/wwwroot/fonts/Outfit/Outfit-VariableFont_wght.ttf") format('truetype');
}

/* ========== TELENA VOICE CHAT PROTOTYPE - FLATWORLD.AI ========== */

/* Professional background for the prototype */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background overlay with geometric patterns */
body::before {
    content: '';
    position/* ========== VOICE MODE ENHANCEMENTS ========== */

/* Voice mode toggle button - Talk to me switch */
.voice-toggle-container {
    position: relative;
}

.btn-voice-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #1a34b8 !important;
    color: #1a34b8 !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-voice-toggle .voice-icon-text {
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-voice-toggle .voice-toggle-text {
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-voice-toggle .voice-icon-mic {
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.btn-voice-toggle:hover {
    background: #1a34b8 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 52, 184, 0.3);
}

.btn-voice-toggle.voice-active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24) !important;
    border-color: #ff6b6b !important;
    color: white !important;
    animation: pulse-voice 2s infinite;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.btn-voice-toggle.voice-active .voice-icon-text {
    opacity: 0.6;
}

.btn-voice-toggle.voice-active .voice-icon-mic {
    opacity: 1;
    transform: scale(1.1);
}

.btn-voice-toggle.voice-active .voice-toggle-text {
    font-weight: 700;
}

/* Voice mode activation loading state */
.btn-voice-toggle:disabled {
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.btn-voice-toggle.activating {
    background: linear-gradient(45deg, #1a34b8, #007bff) !important;
    color: white !important;
    animation: btn-pulse 1.5s ease-in-out infinite;
}

.btn-voice-toggle.activating .voice-toggle-text {
    animation: text-loading 1.5s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(26, 52, 184, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 20px rgba(26, 52, 184, 0.5);
    }
}

@keyframes text-loading {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Enhanced voice activation status styling */
.btn-voice-toggle .voice-toggle-text {
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-voice-toggle.activating .voice-toggle-text {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Voice recording indicator */
.voice-recording-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #ff4757;
    border-radius: 50%;
    animation: pulse-record 1s infinite;
}

/* Enhanced chat widget for voice mode */
#telena-chat.voice-mode-active .telena-chat-chatboxheader {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
    overflow: hidden;
}

#telena-chat.voice-mode-active .telena-chat-chatboxheader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%);
    background-size: 20px 20px;
    animation: voice-header-pattern 2s linear infinite;
}

@keyframes voice-header-pattern {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
};
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%),
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
}

/* Telena logo watermark in bottom left */
body::after {
    content: '';
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 40px;
    background: url('https://demo.telenaai.com/images/telena-logo.png') no-repeat center;
    background-size: contain;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}
body.telena-chat {
    font-family: "Outfit", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-size: 16px;
}

    body.telena-chat-bodybg {
        background: url('https://qa.cdn.telenaai.com/wwwroot/images/bodybg.png') repeat center;
    }


        body.telena-chat-bodybg #main {
            margin-top: 90px;
            /*margin-top: 70px; Design */
            padding: 0px 0px;
            transition: all 0.3s;
            /*min-height: calc(100vh - 136.4px); Design */
            min-height: calc(100vh - 148.6px);
        }

/* Custome Scroll bar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background-color: rgba(245, 245, 245, .3);
    border-radius: 3px;
    width: 0.1vw;
}

::-webkit-scrollbar-thumb {
    background-color: #707070;
    border-radius: 3px;
    width: 0.6vw;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: #000;
    }

.telena-chat-login-wrapper {
    align-items: flex-start;
}

    .telena-chat-login-wrapper .telena-chat-login-inner {
        --background-color: #fff;
    }

    .telena-chat-login-wrapper .telena-chat-login-inner {
        width: 100%;
        min-height: calc(100vh - 80px);
    }


.telena-chat-chatloginbg {
    background-color: #fff;
}

.telena-chat-title {
    font-size: 18px;
    margin-left: 20px;
    white-space: pre-wrap;
}

.telena-chat-chatboxheader {
    background-color: #000000;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    padding: 10px 20px;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.outlook-icon {
    background-image: url("..https://qa.cdn.telenaai.com/wwwroot/images/office365.png");
    transition: background-color 0.3s, box-shadow 0.3s;
    padding: 12px 16px 12px 42px;
    border: none;
    border-radius: 0px;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: #d73b02;
    background-repeat: no-repeat;
    background-position: 5px 5px;
}

/* Fixed layout for proper chat area positioning */
.home-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chatboxbody {
    color: #212121;
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 10px;
    min-height: 0; /* Allows flex item to shrink below content size */
}

/* Ensure the chat area doesn't overlap with input */
.telena-chat-msger {
    padding-bottom: 20px; /* Add some breathing room at bottom */
}

/* Suggested questions area should not take up too much space */
#suggested-questions {
    flex-shrink: 0;
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.telena-chat-logo-bottom {
    bottom: 10px;
}

.telena-chat-smallbot img {
    width: 80px;
    position: absolute;
    animation: heartbeat 1s infinite alternate;
    right: 16px;
    bottom: 0px;
}


@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.telena-chat-botalign {
    position: absolute;
    bottom: 0px;
    animation: heartbeatm 3s infinite alternate;
    right: 42px;
    text-align: right;
}

    .telena-chat-botalign img {
        max-width: 30%;
    }

.telena-chat-btn-close {
    position: absolute;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 1;
    top: 2px;
    right: 0px;
    font-size: 50px;
    color: #cc0000;
}

.telena-chat-msger-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: var(--border);
    background: #eee;
    color: #666;
}

.telena-chat-msger-chat {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    width: 100%;
}

    .telena-chat-msger-chat::-webkit-scrollbar {
        width: 6px;
    }

    .telena-chat-msger-chat::-webkit-scrollbar-track {
        background: #ddd;
    }

    .telena-chat-msger-chat::-webkit-scrollbar-thumb {
        background: #bdbdbd;
    }

.telena-chat-msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
}

    .telena-chat-msg:last-of-type {
        margin: 0;
    }

.telena-chat-msg-img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    background: #ddd;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 50%;
}

.telena-chat-msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.telena-chat-msg-info-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2px;
}

.telena-chat-msg-info-name {
    margin-right: 10px;
    font-weight: bold;
}

.telena-chat-msg-info-time {
    font-size: 76%;
    color: #707070;
}

.telena-chat-left-msg .telena-chat-msg-bubble {
    border-bottom-left-radius: 0;
}

.telena-chat-left-msg .telena-chat-msg-text {
    background: #F5F5F5;
    padding: 10px;
    border-radius: 10px;
    margin-right: 40px;
}

.telena-chat-msg-text {
    font-size: .9rem;
}

.telena-chat-right-msg {
    flex-direction: row-reverse;
}

    .telena-chat-right-msg .telena-chat-msg-bubble {
        background: var(--right-msg-bg);
        color: #212121;
        border-bottom-right-radius: 0;
    }

    .telena-chat-right-msg .telena-chat-msg-text {
        background: #cee2f3;
        padding: 10px;
        border-radius: 10px;
        margin-left: 40px;
        line-height: 18px;
    }

    .telena-chat-right-msg .msg-img {
        margin: 0 0 0 10px;
    }

.telena-chat-msger-inputarea {
    display: flex;
    padding: 10px 30px 10px 25px;
    border-top: var(--border);
    flex-shrink: 0; /* Prevent input area from shrinking */
    background: #fff;
    position: relative;
    z-index: 10; /* Ensure input stays above other content */
}

    .telena-chat-msger-inputarea textarea {
        border: 1px solid #d5d6d8;
        border-radius: 10px 0px 0px 10px;
        width: 100%;
        resize: none;
        padding: 10px;
        font-family: inherit;
        outline: none;
    }

    .telena-chat-msger-inputarea textarea:focus {
        border-color: #1a34b8;
        box-shadow: 0 0 0 2px rgba(26, 52, 184, 0.1);
    }

    .telena-chat-msger-inputarea * {
        border: none;
    }

.telena-chat-msger-input {
    flex: 1;
    background: #ddd;
}

.telena-chat-msger-mic-btn {
    padding: 10px;
    margin: 0;
    border: 1px solid #d5d6d8;
    border-left: none;
    background: #fff;
    color: #212121;
    font-weight: bold;
    border-radius: 0px;
    cursor: pointer;
    transition: background 0.23s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.telena-chat-msger-mic-btn:hover {
    background: #f8f9fa;
}

.telena-chat-msger-send-btn {
    padding: 10px;
    background: #fff;
    color: #212121;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.23s;
    border: 1px solid #d5d6d8;
    border-left: none;
    border-radius: 0px 10px 10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.telena-chat-msger-send-btn:hover {
    background: #1a34b8;
    color: white;
}

a:link,
a:visited {
    color: #444;
    text-decoration: none;
}

/* CSS Multiple Whatsapp Chat */
a.telena-chat-blantershow-chat {
    background: #000000;
    color: #fff !important;
    position: fixed;
    z-index: 9898;
    bottom: 30px;
    right: 3%;
    font-size: 46px;
    border-radius: 50%;
    box-shadow: 0px 3px 6px #00000029;
    width: 80px;
    height: 80px;
    text-align: center;
    line-height: 1.56;
}

@media (max-width: 1024px) {
    #telena-chat {
        right: 37px !important;
    }
}

#telena-chat {
    position: fixed;
    border-radius: 25px;
    -webkit-box-shadow: 0px 3px 6px #00000029;
    -moz-box-shadow: 0px 3px 6px #00000029;
    box-shadow: 0px 3px 6px #00000029;
    bottom: 10px;
    right: 47px;
    overflow: hidden;
    z-index: 9999;
    animation-name: telena-chat-showchat;
    animation-duration: 1s;
    transform: scale(1);
    top: 60px;
    height: calc(100vh - 90px);
    max-height: calc(100vh - 90px);
    width: 560px;
    display: flex;
    flex-direction: column;
}

.telena-chat-msger {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0px 0px 0px 0px;
    flex: 1;
    padding: .5rem 1rem;
    overflow: hidden;
}

#telena-chat.prompt {
    width: 28%;
}

#telena-chat.left, a.telena-chat-blantershow-chat.left {
    left: 3%;
    right: auto;
}

section.telena-chat-divImgPreview {
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100%;
    height: 100vh !important;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100%;
}

.telena-chat-divChatmessage {
    margin: 10px auto 0 auto;
    background: #FFFFFF 0% 0% no-repeat padding-box;
    border: 1px solid #D5D5D5;
    border-radius: 15px;
    padding: .5rem;
    width: 96% !important;
}

    .telena-chat-divChatmessage textarea {
        border: none !important;
        height: 54px;
        resize: none;
        outline: none !important;
        box-shadow: none !important;
    }

        .telena-chat-divChatmessage textarea:focus-visible {
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
        }

.telena-chat-msger-poweredby {
    text-align: center;
    padding: 0rem 0;
}

/* Branding section at bottom - no extra spacing */
.home-chat .text-center.py-2 {
    padding: 8px 0 !important; /* Reduced padding */
    flex-shrink: 0; /* Prevent from shrinking */
    background: #fff;
    border-top: 1px solid #e9ecef;
    margin-top: 0;
}

/* ========== VOICE MODE SPEAKING ANIMATION ========== */

/* Enhanced voice mode button with text */
.voice-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 12px;
    min-width: 70px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.voice-mode-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.voice-mode-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.voice-mode-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.voice-toggle-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0.9;
}

/* Active voice mode styling */
.voice-mode-btn.voice-active {
    background: linear-gradient(135deg, #28a745, #20c997);
    animation: voiceActivePulse 2s infinite;
}

.voice-mode-btn.voice-active .voice-toggle-text {
    color: white;
}

/* Activating state */
.voice-mode-btn.activating {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    cursor: wait;
}

.voice-mode-btn.activating .voice-mode-icon {
    animation: spin 1s linear infinite;
}

.voice-mode-btn.activating .voice-toggle-text {
    color: white;
    animation: textPulse 1s ease-in-out infinite alternate;
}

/* Muted state styling */
.voice-mode-btn.muted {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.voice-mode-btn.muted .voice-toggle-text {
    color: white;
}

/* Animations */
@keyframes voiceActivePulse {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }
    50% { 
        box-shadow: 0 4px 16px rgba(40, 167, 69, 0.6);
        transform: scale(1.02);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes textPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .voice-mode-btn {
        min-width: 60px;
        padding: 6px 8px;
    }
    
    .voice-toggle-text {
        font-size: 9px;
    }
    
    .voice-mode-icon {
        font-size: 16px;
    }
}

/* Voice Mode Banner (appears above chat when voice is active) */
.voice-mode-banner {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.3s ease;
}

.voice-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.voice-banner-icon {
    font-size: 16px;
    animation: pulse-icon 1.5s infinite;
}

.voice-banner-text {
    font-size: 14px;
    font-weight: 500;
}

.voice-banner-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.voice-banner-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.voice-listening-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.listening-text {
    font-size: 12px;
    font-weight: 500;
}

/* Header Voice Status Indicator */
.voice-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.voice-active-icon {
    color: #28a745 !important;
    animation: pulse-icon 1.5s infinite;
}
.voice-mode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.voice-mode-overlay.active {
    opacity: 1;
    visibility: visible;
}

.voice-mode-overlay.muted-state {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(0, 0, 0, 0.8));
}

.voice-mode-overlay.muted-state .voice-status {
    color: #dc3545;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.voice-mode-overlay.muted-state .voice-subtitle {
    color: #fff;
    background: rgba(220, 53, 69, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.voice-mode-overlay.muted-state .sound-waves {
    opacity: 0.3 !important;
}

.voice-mode-overlay.muted-state .sound-waves .wave-bar {
    background: #dc3545;
    animation: none;
}

.speaking-animation {
    text-align: center;
    color: white;
    position: relative;
}

.voice-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.voice-avatar-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.voice-avatar i {
    font-size: 48px;
    color: white;
}

/* Enhanced sound wave animations */
.sound-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin: 20px 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.sound-waves.sound-pulse {
    opacity: 1;
}

.wave-bar {
    width: 4px;
    height: 20px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
    animation: waveIdle 2s ease-in-out infinite;
    transform-origin: center;
}

/* Synchronized pulse animation when thinking sound plays */
.sound-waves.sound-pulse .wave-bar {
    animation: wavePulse 0.3s ease-out;
    background: linear-gradient(45deg, #28a745, #20c997);
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; }
.wave-bar:nth-child(5) { animation-delay: 0s; }

@keyframes waveIdle {
    0%, 100% { 
        transform: scaleY(0.5);
        opacity: 0.6;
    }
    50% { 
        transform: scaleY(1.2);
        opacity: 1;
    }
}

@keyframes wavePulse {
    0% { 
        transform: scaleY(0.5) scaleX(1);
        opacity: 0.8;
    }
    50% { 
        transform: scaleY(2) scaleX(1.5);
        opacity: 1;
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
    }
    100% { 
        transform: scaleY(1.2) scaleX(1);
        opacity: 0.9;
    }
}

/* Enhanced listening state with sound sync */
.voice-mode-overlay.listening .sound-waves {
    opacity: 1;
}

.voice-mode-overlay.thinking .sound-waves {
    opacity: 1;
}

.voice-mode-overlay.thinking .sound-waves .wave-bar {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    animation: waveThinking 0.6s ease-in-out infinite;
}

@keyframes waveThinking {
    0%, 100% { 
        transform: scaleY(0.8);
        opacity: 0.7;
    }
    50% { 
        transform: scaleY(1.5);
        opacity: 1;
        filter: brightness(1.2);
    }
}

/* Speaking animation */
.voice-mode-overlay.speaking .sound-waves .wave-bar {
    background: linear-gradient(45deg, #28a745, #20c997);
    animation: waveSpeaking 0.4s ease-in-out infinite;
}

@keyframes waveSpeaking {
    0%, 100% { 
        transform: scaleY(0.6);
        opacity: 0.8;
    }
    50% { 
        transform: scaleY(2.2);
        opacity: 1;
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
    }
}

/* Voice Controls */
.voice-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.voice-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.voice-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.voice-control-exit {
    background: linear-gradient(135deg, #6c757d, #495057);
    border-color: #6c757d;
}

.voice-control-exit:hover {
    background: linear-gradient(135deg, #5a6268, #343a40);
}

/* Voice Hint */
.voice-hint {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.3s ease;
}

.voice-hint i {
    color: #007bff;
}

/* Enhanced Input Area */
.telena-chat-divChatmessage {
    align-items: flex-end;
    padding: 8px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

#msg-input-area {
    flex: 1;
    margin: 0 8px;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    resize: none;
    font-size: 14px;
    line-height: 1.4;
    max-height: 80px;
    transition: all 0.3s ease;
}

#msg-input-area:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Listening Pulse Animation */
.listening-pulse {
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-listening 1s infinite;
}

/* Keyframe Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse-success {
    0%, 100% { box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(40, 167, 69, 0.6); }
}

@keyframes pulse-listening {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.6);
    }
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wave-animation {
    0%, 40%, 100% { 
        transform: scaleY(0.4);
        height: 16px;
    }
    20% { 
        transform: scaleY(1);
        height: 32px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .voice-mode-btn {
        width: 38px;
        height: 38px;
        margin-right: 6px;
    }
    
    .voice-mode-icon {
        font-size: 16px;
    }
    
    .voice-avatar {
        width: 100px;
        height: 100px;
    }
    
    .voice-avatar i {
        font-size: 40px;
    }
    
    .voice-controls {
        gap: 12px;
    }
    
    .voice-control-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Hide traditional record button when voice mode is available */
.voice-mode-available .telena-chat-msger-mic-btn {
    display: none !important;
}

.telena-chat-avatar {
    background-color: #212752;
    height: 60px;
    width: 60px;
    border: 2px solid #fff;
    padding: 0px;
    border-radius: 50%;
    position: relative;
}

    .telena-chat-avatar::before, .telena-chat-avatar::after {
        content: "";
        position: absolute;
        height: 6px;
        width: 6px;
        transform: rotate(45deg);
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        margin: auto;
    }

    .telena-chat-avatar::before {
        box-shadow: 0px 0px 0px transparent;
    }

    .telena-chat-avatar::after {
        box-shadow: 0px 0px 0px transparent;
    }

    .telena-chat-avatar img {
        max-width: 100%;
        height: 100%;
        -o-object-fit: cover;
        object-fit: cover;
        border-radius: inherit;
    }

a.telena-chat-blantershow-chat i {
    transform: scale(1.2);
    margin: 0 10px 0 0
}

.telena-chat-header-chat {
    background: #F86648;
    color: #fff;
}

    .telena-chat-header-chat h3 {
        margin: 0 0 10px
    }

    .telena-chat-header-chat p {
        font-size: 14px;
        line-height: 1.7;
        margin: 0
    }

#telena-chat-get-label {
    font-size: 12px;
    color: #888
}

#telena-chat-get-label {
    color: #fff
}

.telena-chat-blanter-msg {
    color: #444;
    padding: 20px;
    font-size: 12.5px;
    text-align: center;
    border-top: 1px solid #ddd
}

textarea#telena-chat-chat-input {
    border: none;
    font-family: 'Arial', sans-serif;
    width: 100%;
    height: 20px;
    outline: none;
    resize: none
}

a#telena-chat-send-it {
    color: #555;
    width: 40px;
    margin: -5px 0 0 5px;
    font-weight: 700;
    padding: 8px;
    background: #eee;
    border-radius: 10px
}

.telena-chat-start-chat .telena-chat-blanter-msg {
    display: flex
}

#telena-chat-get-number {
    display: none
}

a.telena-chat-close-chat {
    position: absolute;
    top: 5px;
    right: 15px;
    color: #fff;
    font-size: 30px
}

@keyframes telena-chat-showhide {
    from {
        transform: scale(.5);
        opacity: 0
    }
}

@keyframes telena-chat-showchat {
    from {
        transform: scale(0);
        opacity: 0
    }
}

@media screen and (max-width:480px) {
    #telena-chat {
        width: auto;
        left: 5%;
        right: 5%;
        font-size: 80%
    }
}

.telena-chat-hide {
    display: none;
    animation-name: telena-chat-showhide;
    animation-duration: 1.5s;
    transform: scale(1);
    opacity: 1
}

.telena-chat-show {
    display: block;
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
    transition: visibility 0s linear 0.33s, opacity 0.33s linear
}

.telena-chat-popup-messages {
    display: inline-block;
    background-color: transparent;
    border-color: rgb(38, 184, 206);
    border: 1px solid rgb(38, 184, 206);
    margin-bottom: 10px;
    color: black;
    padding: 4px 8px;
    border-radius: 7px;
    margin-left: 7px;
    line-height: 14px;
    font-size: .7rem;
    margin-right: 0px;
    margin-top: 7px;
}

.telena-chat-typing {
    align-items: center;
    display: flex;
    height: 17px;
}

    .telena-chat-typing .dot {
        animation: telena-chat-mercuryTypingAnimation 1.8s infinite ease-in-out;
        background-color: #6CAD96;
        border-radius: 50%;
        height: 7px;
        margin-right: 4px;
        vertical-align: middle;
        width: 7px;
        display: inline-block;
    }

        .telena-chat-typing .dot:nth-child(1) {
            animation-delay: 200ms;
        }

        .telena-chat-typing .dot:nth-child(2) {
            animation-delay: 300ms;
        }

        .telena-chat-typing .dot:nth-child(3) {
            animation-delay: 400ms;
        }

        .telena-chat-typing .dot:last-child {
            margin-right: 0;
        }

@keyframes telena-chat-mercuryTypingAnimation {
    0% {
        transform: translateY(0px);
        background-color: #6CAD96;
    }

    28% {
        transform: translateY(-7px);
        background-color: #9ECAB9;
    }

    44% {
        transform: translateY(0px);
        background-color: #B5D9CB;
    }
}

#telena-chat.show {
    animation: .5s slide-left;
}

.telena-chat-msg-bubble {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.telena-chat-msg-text {
    margin-bottom: 0;
}

.telena-chat-msg-text > *:last-child {
    margin-bottom: 0;
}

.telena-chat-feedback-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.telena-chat-feedback-icon {
    cursor: pointer;
    font-size: 16px;
    color: #000000;
    transition: color 0.2s;
}

.telena-chat-feedback-icon:hover {
    color: #022d5c;
}

.bi-hand-thumbs-up-fill,
.bi-hand-thumbs-down-fill {
    color: #022d5c;
}

/* Chat button icon styling */
a.telena-chat-blantershow-chat::before {
    content: "\F1B2";
    font-family: 'bootstrap-icons';
    font-size: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Custom tooltip styling */
.telena-chat-custom-tooltip {
    position: absolute;
    bottom: 110%;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999999;
    max-width: 200px;
    text-align: center;
}

.telena-chat-custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: #333;
}

.telena-chat-widget-container:hover .telena-chat-custom-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Left position classes */
.left .telena-chat-custom-tooltip {
    left: 0;
    right: auto;
}

.left .telena-chat-custom-tooltip::after {
    left: 20px;
    right: auto;
}

/* Voice mode button styling - ADDED FOR VOICE CHAT */
.btn-voice-toggle {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
    border: none !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-voice-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(40,167,69,0.3);
}

.btn-voice-toggle.voice-active {
    background: linear-gradient(45deg, #dc3545, #fd7e14) !important;
    animation: pulse-voice 2s infinite;
}

@keyframes pulse-voice {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Red recording button - ADDED FOR VOICE CHAT */
.red-record {
    color: #dc3545 !important;
    animation: pulse-record 1.5s infinite;
}

@keyframes pulse-record {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Record option button - ADDED FOR VOICE CHAT */
.btn-record-option {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    margin: 0 10px;
}

.btn-record-option i {
    font-size: 18px;
}

/* Bootstrap utility classes */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.align-items-center { align-items: center !important; }
.justify-align-start { justify-content: flex-start !important; }
.ms-auto { margin-left: auto !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.p-0 { padding: 0 !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.img-fluid { max-width: 100%; height: auto; }
.hide { display: none !important; }
.msg-info-left { display: flex; align-items: center; margin-bottom: 5px; }