body, html {
    height: 100%;
    margin: 0;
    padding-top: 0px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   iOS-STYLE CHAT DESIGN
   ======================================== */

/* Color variables */
:root {
    --ios-primary-purple: #8B5CF6;
    --ios-primary-purple-hover: #7C3AED;
    --ios-gradient-1: #2A1545;  /* 0% - subtle purple at top */
    --ios-gradient-2: #190F32;  /* 8% */
    --ios-gradient-3: #0C0C16;  /* 20-85% - dark navy middle */
    --ios-gradient-4: #121223;  /* 100% - slight purple tint at bottom */
    --ios-text-white: #FFFFFF;
    --ios-text-muted: rgba(255, 255, 255, 0.5);
    --ios-overlay-dark: rgba(0, 0, 0, 0.25);
    --ios-border-light: rgba(255, 255, 255, 0.15);
    --ios-placeholder: rgba(255, 255, 255, 0.5);
    --ios-glass-bg: rgba(255, 255, 255, 0.05);
    --ios-glass-border: rgba(255, 255, 255, 0.1);
    --ios-shadow-light: rgba(0, 0, 0, 0.1);
    --ios-shadow-medium: rgba(0, 0, 0, 0.2);
    --ios-glow-purple: rgba(139, 92, 246, 0.4);
}

/* Main chat section with gradient background - purple glow fading to dark navy */
.chat-section-ios {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        var(--ios-gradient-1) 0%,
        var(--ios-gradient-2) 8%,
        var(--ios-gradient-3) 20%,
        var(--ios-gradient-3) 85%,
        var(--ios-gradient-4) 100%
    );
    display: flex;
    justify-content: center;
    padding: 0;
    z-index: 1;
}

/* Chat wrapper - centered container with glassmorphism */
.chat-wrapper-ios {
    width: 100%;
    max-width: 1000px !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 100px; /* Account for fixed navbar + extra spacing */
    padding-left: 24px;
    padding-right: 24px;
}

/* Glass container effect around messages area */
.chat-wrapper-ios::before {
    content: '';
    position: absolute;
    top: 90px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: var(--ios-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ios-glass-border);
    border-radius: 24px;
    pointer-events: none;
    z-index: -1;
}

/* Trial badge container - positioned at top right */
.trial-badge-container-ios {
    position: absolute;
    top: 8px;
    right: 16px;
    z-index: 10;
}

.trial-badge-ios {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}

/* AI Disclaimer */
.ai-disclaimer-ios {
    padding: 8px 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.4;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* Chat messages area */
.chat-messages-ios {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

.chat-list-ios {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.message-item-ios {
    margin-bottom: 12px;
    animation: messageSlideIn 0.3s ease-out;
}

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

/* Message rows */
.message-row-ios {
    display: flex;
    width: 100%;
}

.message-row-ios.user-row {
    justify-content: flex-end;
}

.message-row-ios.ai-row {
    justify-content: flex-start;
}

/* Message bubbles */
.message-bubble-ios {
    max-width: 75%;
    padding: 14px 18px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--ios-text-white);
    word-wrap: break-word;
    position: relative;
}

/* AI bubble - left side, muted dark purple */
.message-bubble-ios.ai-bubble {
    max-width: 75%;
    background: rgba(45, 40, 55, 0.85);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 18px 18px 18px 4px;
    box-shadow: none;
}

/* User bubble - right side, iMessage style purple */
.message-bubble-ios.user-bubble {
    background: #8B5CF6;
    border-radius: 18px 18px 4px 18px;
    box-shadow: none;
}

/* Message timestamp */
.message-timestamp {
    font-size: 11px;
    color: var(--ios-text-muted);
    margin-top: 6px;
    opacity: 0.7;
}

.user-row .message-timestamp {
    text-align: right;
}

.ai-row .message-timestamp {
    text-align: left;
}

/* Input area */
.chat-input-area-ios {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: transparent;
    position: relative;
}

.input-container-ios {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--ios-glass-border);
    border-radius: 28px;
    padding: 10px 10px 10px 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--ios-shadow-light);
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.input-container-ios:focus-within {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 4px 20px var(--ios-shadow-medium);
    background: rgba(255, 255, 255, 0.08);
}

.message-input-ios {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ios-text-white);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
}

.message-input-ios::placeholder {
    color: var(--ios-placeholder);
}

.send-btn-ios {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ios-primary-purple) 0%, var(--ios-primary-purple-hover) 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ios-text-white);
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--ios-glow-purple);
}

.send-btn-ios:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--ios-glow-purple);
}

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

/* Image attach button — matches voice button style */
.image-attach-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.25);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ios-text-white);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.image-attach-btn:hover {
    transform: scale(1.05);
    background: rgba(139, 92, 246, 0.4);
}

.image-attach-btn:active {
    transform: scale(0.95);
}

/* Attach button wrapper for popup positioning */
.attach-btn-wrapper {
    position: relative;
    flex-shrink: 0;
}

/* Attach menu overlay */
.attach-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

.attach-menu-overlay.open {
    display: block;
    animation: attachOverlayIn 0.2s ease-out;
}

.attach-menu-overlay.closing {
    animation: attachOverlayOut 0.15s ease-in forwards;
}

/* Attach popup menu */
.attach-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: rgb(40, 40, 44);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    z-index: 100;
    overflow: hidden;
    min-width: 160px;
}

.attach-menu.open {
    display: block;
    animation: attachMenuIn 0.2s ease-out;
}

.attach-menu.closing {
    animation: attachMenuOut 0.15s ease-in forwards;
}

.attach-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.attach-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.attach-menu-item:active {
    background: rgba(255, 255, 255, 0.12);
}

.attach-menu-item svg {
    flex-shrink: 0;
    opacity: 0.9;
}

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

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

@keyframes attachOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes attachOverlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Image preview bar above input */
.image-preview-bar {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    gap: 8px;
}

.image-preview-thumb-wrap {
    position: relative;
    display: inline-block;
}

.image-preview-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--ios-glass-border);
}

.image-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image thumbnail in chat bubbles */
.chat-image-wrap {
    margin-bottom: 6px;
    overflow: hidden;
    max-width: 200px;
}

.chat-image-thumb {
    display: block;
    width: 100%;
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.chat-image-thumb:hover {
    opacity: 0.85;
}

/* Voice record button — inline waveform icon inside the input bubble, left of send */
.voice-btn-ios {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(235, 235, 245, 0.6);
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.voice-btn-ios:hover {
    color: rgba(235, 235, 245, 0.9);
}

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

/* Recording state — red background */
.voice-btn-ios.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border: none;
    outline: none;
}

/* Recording overlay inside input bubble */
#recording-overlay {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 24px;
}

.waveform-bars {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 28px;
}

.waveform-bar {
    width: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.6);
    animation: waveformPulse ease-in-out infinite alternate;
}

@keyframes waveformPulse {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(0.3); }
}

.recording-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}


/* Audio player in AI bubbles */
.voice-audio-player {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.play-audio-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.25);
    border: none;
    color: var(--ios-text-white);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    font-size: 14px;
    line-height: 1;
}

.play-audio-btn:hover {
    transform: scale(1.1);
    background: rgba(139, 92, 246, 0.4);
    box-shadow: none;
}

.play-audio-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Loading state while TTS generates */
.play-audio-btn.loading {
    opacity: 0.5;
    cursor: default;
    position: relative;
}

.play-audio-btn.loading::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--ios-primary-purple);
    animation: voiceSpin 1s linear infinite;
}

.clear-btn-ios {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ios-text-white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.clear-btn-ios:hover {
    background: #f1f5f9;
    color: #dc2626;
}

.clear-btn-ios:active {
    transform: scale(0.95);
}

/* Typing indicator - iOS style with improved animation */
.typing-indicator-ios {
    display: none;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px 20px 20px 20px;
    width: fit-content;
    min-width: 80px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px var(--ios-shadow-light);
    animation: messageSlideIn 0.3s ease-out;
}

.typing-indicator-ios.show {
    display: flex !important;
    align-items: center;
    gap: 5px;
}

.typing-indicator-ios span {
    height: 8px;
    width: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: inline-block;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator-ios span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-indicator-ios span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Scrollbar styling for iOS chat */
.chat-messages-ios::-webkit-scrollbar {
    width: 6px;
}

.chat-messages-ios::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages-ios::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.chat-messages-ios::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.chat-messages-ios {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .chat-wrapper-ios {
        max-width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .chat-wrapper-ios::before {
        left: 4px;
        right: 4px;
        border-radius: 20px;
    }

    .message-bubble-ios {
        max-width: 85%;
        padding: 12px 14px;
        font-size: 14px;
    }

    .chat-messages-ios {
        padding: 12px 12px;
    }

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

    .input-container-ios {
        padding: 8px 8px 8px 8px;
        border-radius: 24px;
    }

    .send-btn-ios {
        width: 40px;
        height: 40px;
    }

    .voice-btn-ios {
        width: 40px;
        height: 40px;
    }

    .chat-header-ios {
        padding: 12px 16px;
    }
}

/* ========================================
   LEGACY STYLES (kept for backward compatibility)
   ======================================== */

.chat-section {
    height: 100vh;
    background: #7F7FD5;
    background: -webkit-linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5);
    background: linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5);
}

.chat-section .chat-container {
    height: calc(100% - 50px);
    border-radius: 15px !important;
}

.chat-section .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 15px !important;
    background-color: #506690 !important;
}

.chat{
    margin-top: auto;
    margin-bottom: auto;
}
.card{
    height: 80vh;
    border-radius: 15px !important;
    background-color: rgba(0,0,0,0.4) !important;
}
.contacts_body{
    padding:  0.75rem 0 !important;
    overflow-y: auto;
    white-space: nowrap;
}
.msg_card_body{
    overflow-y: auto;
}
.card-header{
    border-radius: 15px 15px 0 0 !important;
    border-bottom: 0 !important;
}
.card-footer{
border-radius: 0 0 15px 15px !important;
    border-top: 0 !important;
}
.container{
    align-content: center;
}
.search{
    border-radius: 15px 0 0 15px !important;
    background-color: rgba(0,0,0,0.3) !important;
    border:0 !important;
    color:white !important;
}
.search:focus{
     box-shadow:none !important;
   outline:0px !important;
}
.type_msg{
    background-color: rgba(0,0,0,0.3) !important;
    border:0 !important;
    color:white !important;
    height: 60px !important;
    overflow-y: auto;
}
    .type_msg:focus{
     box-shadow:none !important;
   outline:0px !important;
}
.attach_btn{
border-radius: 15px 0 0 15px !important;
background-color: rgba(0,0,0,0.3) !important;
    border:0 !important;
    color: white !important;
    cursor: pointer;
}
.send_btn{
    border-radius: 0 15px 15px 0 !important;
    background-color: rgba(0,0,0,0.3) !important;
    border:0 !important;
    color: white !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.send_btn:hover {
    background-color: rgba(0,0,0,0.5) !important;
}

.clear_btn {
    border-radius: 0 !important;
    background-color: rgba(0,0,0,0.3) !important;
    border:0 !important;
    color: white !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear_btn:hover {
    background-color: rgba(220, 53, 69, 0.6) !important;
}
.search_btn{
    border-radius: 0 15px 15px 0 !important;
    background-color: rgba(0,0,0,0.3) !important;
    border:0 !important;
    color: white !important;
    cursor: pointer;
}
.contacts{
    list-style: none;
    padding: 0;
}
.contacts li{
    width: 100% !important;
    padding: 5px 10px;
    margin-bottom: 15px !important;
}
.active{
    background-color: rgba(0,0,0,0.3);
}
.user_img{
    height: 70px;
    width: 70px;
    border:1.5px solid #f5f6fa;

}
.user_img_msg{
    height: 40px;
    width: 40px;
    border:1.5px solid #f5f6fa;

}
.img_cont{
    position: relative;
    height: 70px;
    width: 70px;
}
.img_cont_msg{
    height: 40px;
    width: 40px;
}
.online_icon{
position: absolute;
height: 15px;
width:15px;
background-color: #4cd137;
border-radius: 50%;
bottom: 0.2em;
right: 0.4em;
border:1.5px solid white;
}
.offline{
background-color: #c23616 !important;
}
.user_info{
margin-top: auto;
margin-bottom: auto;
margin-left: 15px;
}
.user_info span{
font-size: 20px;
color: white;
}
.user_info p{
font-size: 10px;
color: rgba(255,255,255,0.6);
}
.video_cam{
margin-left: 50px;
margin-top: 5px;
}
.video_cam span{
color: white;
font-size: 20px;
cursor: pointer;
margin-right: 20px;
}
.msg_cotainer {
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: 10px;
    margin-right: 250px;
    border-radius: 20px;
    background-color: #7f7fd5 !important;
    padding: 16px 20px;
    position: relative;
    color: white;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 576px) {
    .msg_cotainer {
        margin-right: 40px;
        margin-left: 10px;
    }

    .msg_cotainer_send {
        margin-left: 40px;
        margin-right: 10px;
    }
}

.msg_cotainer_send {
    margin-top: 8px;
    margin-bottom: 8px;
    margin-right: 10px;
    margin-left: 100px;
    border-radius: 20px;
    background-color: #4a5378 !important;
    color: white;
    font-size: 15px;
    padding: 16px 20px;
    position: relative;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.msg_time{
position: absolute;
left: 0;
bottom: -15px;
color: rgba(255,255,255,0.5);
font-size: 10px;
}
.msg_time_send{
position: absolute;
right:0;
bottom: -15px;
color: rgba(255,255,255,0.5);
font-size: 10px;
}
.msg_head{
position: relative;
}
#action_menu_btn{
position: absolute;
right: 10px;
top: 10px;
color: white;
cursor: pointer;
font-size: 20px;
}
.action_menu{
z-index: 1;
position: absolute;
padding: 15px 0;
background-color: rgba(0,0,0,0.5);
color: white;
border-radius: 15px;
top: 30px;
right: 15px;
display: none;
}
.action_menu ul{
list-style: none;
padding: 0;
margin: 0;
}
.action_menu ul li{
width: 100%;
padding: 10px 15px;
margin-bottom: 5px;
}
.action_menu ul li i{
padding-right: 10px;

}
.action_menu ul li:hover{
cursor: pointer;
background-color: rgba(0,0,0,0.2);
}
@media (max-width: 576px) {
    .card {
        height: auto;
        margin-bottom: 15px !important;
    }

    .msg_card_body {
        height: 400px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .card {
        height: auto;
        margin-bottom: 15px !important;
    }

    .msg_card_body {
        height: 500px;
    }
}

/* For WebKit browsers (Chrome, Safari) */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* For Firefox */
.chat-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) rgba(0, 0, 0, 0.1);
}

/* Legacy typing indicator */
.typing-indicator {
    display: none;
    margin: 8px 10px 16px 10px;
    padding: 16px 24px;
    background-color: #7f7fd5 !important;
    border-radius: 20px;
    width: fit-content;
    min-width: 90px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.typing-indicator.show {
    display: block !important;
}

.typing-indicator span {
    height: 10px;
    width: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    animation: typing 1.4s infinite ease-in-out;
}

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

.typing-indicator span:last-child {
    margin-right: 0;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-12px);
        opacity: 1;
    }
}
