* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --app-height: 100dvh;
}

html,
body {
    width: 100%;
    height: 100%;
    height: var(--app-height, 100dvh);
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #2d055e;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Screen Wrapper matching meta_ai design */
.chat-app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    height: var(--app-height, 100dvh);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #5A11B8;
    background: linear-gradient(180deg, #5309a8 0%, #5A11B8 100%);
    position: relative;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

@media (max-width: 540px) {
    body {
        align-items: stretch;
    }

    .chat-app-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        height: var(--app-height, 100dvh);
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Ambient Botanical Artwork Patterns */
.pattern-leaves {
    position: absolute;
    bottom: 45px;
    right: 0;
    width: 180px;
    height: 240px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.12;
}

/* Top Header Bar matching image */
.chat-header {
    position: relative;
    z-index: 50;
    background: linear-gradient(180deg, #480996 0%, #540fb5 100%);
    min-height: 54px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.btn-back {
    background: none;
    border: none;
    font-size: 19px;
    color: #ffffff;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Circular Butterfly Avatar matching screenshot */
.avatar-wrap {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ff2a85 50%, #7928ca 100%);
    padding: 2.2px;
    box-shadow: 0 0 11px rgba(255, 42, 133, 0.45), 0 2px 5px rgba(0, 0, 0, 0.25);
}

.chat-header-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #1a0033;
}

.header-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.header-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.hand-pointer,
.hand-pointer-icon {
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: handPulse 1.4s ease-in-out infinite alternate;
}

@keyframes handPulse {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(4px);
    }
}

/* Top Right Corner Language Switcher (Hidden from header per user request) */
.lang-toggle-top {
    display: none !important;
}

.top-lang-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 14px;
    cursor: pointer;
    line-height: 1.1;
    transition: all 0.2s ease;
    font-family: inherit;
}

.top-lang-btn.active {
    background: #ffffff;
    color: #5A11B8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.btn-menu-dots {
    background: rgba(255, 255, 255, 0.22);
    border: none;
    color: #ffffff;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-menu-dots:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Top-Right Dropdown Menu */
.header-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    min-width: 190px;
    display: none;
    flex-direction: column;
    padding: 6px 0;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.08);
    animation: fadeInMenu 0.18s ease-out;
}

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

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

.header-menu-dropdown.show {
    display: flex;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
    background: #f3f0fb;
    color: #5A11B8;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Language Change Toast */
.lang-toast {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(30, 27, 75, 0.95);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.lang-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Encryption Notice Banner matching image */
.encryption-banner {
    background: #ede5fc;
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #2e0854;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin: 5px 10px 5px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    flex-shrink: 0;
    z-index: 10;
}

.encryption-banner .enc-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5A11B8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    margin-top: 1px;
}

.encryption-banner a {
    color: #6d16cc;
    text-decoration: none;
    font-weight: 700;
}

/* Featured 3 Action Pills matching screenshot exactly */
.top-action-pills-bar {
    display: flex;
    gap: 7px;
    margin: 3px 10px 6px;
    flex-shrink: 0;
    z-index: 10;
}

.action-pill-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 37px;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 800;
    padding: 0 4px;
    color: #ffffff !important;
    text-decoration: none !important;
    border: none;
    outline: none;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.action-pill-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.action-pill-btn:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

/* 1. Pink Pill: হোম পেজ */
.action-pill-btn.pill-home {
    background: linear-gradient(180deg, #ff4da6 0%, #ff1493 45%, #d8006f 100%);
    box-shadow: 0 3px 8px rgba(255, 20, 147, 0.4), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.8), inset 0 -1.5px 3px rgba(0, 0, 0, 0.2);
    border: 1.2px solid #ff85c2;
}

/* 2. Cyan/Blue Pill: REGD. */
.action-pill-btn.pill-regd {
    background: linear-gradient(180deg, #38bdf8 0%, #0099ff 45%, #0066cc 100%);
    box-shadow: 0 3px 8px rgba(0, 153, 255, 0.4), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.8), inset 0 -1.5px 3px rgba(0, 0, 0, 0.2);
    border: 1.2px solid #70d2ff;
}

/* 3. Green Pill: SUPPORT */
.action-pill-btn.pill-support {
    background: linear-gradient(180deg, #4ade80 0%, #00c853 45%, #00993d 100%);
    box-shadow: 0 3px 8px rgba(0, 200, 83, 0.4), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.8), inset 0 -1.5px 3px rgba(0, 0, 0, 0.2);
    border: 1.2px solid #7cf1a4;
}

/* Quick Action Chips */
.quick-chips-bar {
    display: none;
    gap: 8px;
    margin: 4px 12px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
    z-index: 10;
}

.quick-chips-bar::-webkit-scrollbar {
    display: none;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.94);
    text-decoration: none;
    border: none;
    color: #5A11B8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chip-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

/* Scrollable Message Body */
.chat-body {
    position: relative;
    z-index: 10;
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-body::-webkit-scrollbar {
    width: 4px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

/* Message Bubbles matching meta_ai design in image */
.msg-row {
    display: flex;
    width: 100%;
    animation: fadeInMsg 0.22s ease-out;
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

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

.msg-row.bot,
.msg-row.admin {
    justify-content: flex-start;
}

.msg-bubble {
    max-width: 88%;
    padding: 12px 14px 10px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Bot & Admin Reply Bubble: Deep Purple Gradient matching image with white font */
.msg-row.bot .msg-bubble,
.msg-row.admin .msg-bubble {
    background: linear-gradient(180deg, #5309a8 0%, #5A11B8 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
    border-top-left-radius: 4px;
    max-width: 92%;
}

.msg-row.bot .msg-bubble *,
.msg-row.admin .msg-bubble * {
    color: #ffffff !important;
}

.msg-row.bot .msg-bubble .sender-tag,
.msg-row.admin .msg-bubble .sender-tag,
.msg-row.bot .msg-bubble .sender-tag i,
.msg-row.admin .msg-bubble .sender-tag i {
    color: #ffffff !important;
}

.msg-row.bot .msg-bubble strong,
.msg-row.bot .msg-bubble b,
.msg-row.admin .msg-bubble strong,
.msg-row.admin .msg-bubble b {
    color: #ffffff !important;
}

.msg-row.bot .msg-bubble a,
.msg-row.admin .msg-bubble a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.msg-row.bot .msg-bubble .msg-footer,
.msg-row.bot .msg-bubble .msg-time,
.msg-row.admin .msg-bubble .msg-footer,
.msg-row.admin .msg-bubble .msg-time {
    color: rgba(255, 255, 255, 0.85) !important;
}

.msg-row.bot .msg-bubble .ticks,
.msg-row.admin .msg-bubble .ticks {
    color: #4ade80 !important;
}

.msg-row.bot .msg-bubble .ticks.read,
.msg-row.admin .msg-bubble .ticks.read {
    color: #60a5fa !important;
}

.msg-bubble a {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.msg-bubble a:active {
    transform: scale(0.98);
}

/* Simple Clean Action Button Design (No Heavy Boxes) */
.chat-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.25);
}

.msg-row.user .chat-btn-group {
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.chat-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-action-btn.primary {
    background: #00a884;
    color: #ffffff !important;
}

.chat-action-btn.primary:hover {
    background: #008f6f;
}

.chat-action-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.chat-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.msg-row.user .chat-action-btn.secondary {
    background: #f1f5f9;
    color: #5A11B8 !important;
    border: 1px solid #cbd5e1;
}

.msg-row.user .chat-action-btn.secondary:hover {
    background: #e2e8f0;
}

.chat-action-btn.whatsapp {
    background: #ffffff;
    color: #25d366 !important;
    border: 1px solid #25d366;
}

.chat-action-btn.whatsapp:hover {
    background: #f0fdf4;
}

/* User (Sent) Message: White Card with Purple Left Border or Vibrant Violet */
.msg-row.user .msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border-top-right-radius: 4px;
    border-left: 3.5px solid #5A11B8;
}

.sender-tag {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.msg-row.user .sender-tag {
    color: #5A11B8;
}

.msg-row.bot .sender-tag {
    color: #5A11B8;
}

.msg-row.admin .sender-tag {
    color: #7c3aed;
}

.msg-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 5px;
}

.ticks {
    color: #10b981 !important;
    /* Green by default (sent / delivered / unread) */
    font-size: 11px;
    transition: color 0.25s ease;
}

.ticks.read {
    color: #2563eb !important;
    /* Blue when read by recipient or bot */
}

/* Bottom Input Bar matching image */
.chat-input-bar {
    position: relative;
    z-index: 30;
    background: transparent;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.input-pill {
    flex: 1;
    background: #ffffff;
    border-radius: 28px;
    display: flex;
    align-items: center;
    padding: 2px 8px 2px 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    min-height: 44px;
    height: 44px;
    min-width: 0;
    box-sizing: border-box;
}

.input-pill input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14.5px;
    color: #1e293b;
    padding: 6px 4px;
    min-width: 0;
}

.input-pill input::placeholder {
    color: #94a3b8;
}

.input-icon-btn {
    background: none;
    border: none;
    color: #5A11B8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.15s, color 0.15s;
    flex-shrink: 0;
}

.input-icon-btn:hover {
    color: #480996;
    transform: scale(1.08);
}

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c15d4 0%, #5A11B8 100%);
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(90, 17, 184, 0.45);
    transition: transform 0.15s, filter 0.15s;
}

.btn-send:hover {
    filter: brightness(1.1);
}

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

.btn-send.recording {
    background: #ef4444 !important;
    animation: pulse-record 1s infinite alternate;
}

@keyframes pulse-record {
    from {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    to {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Toast Message */
.toast-msg {
    position: absolute;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 27, 75, 0.95);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    pointer-events: none;
}

/* ----------------------------------------------------
           FIRST IMAGE MODAL: GET USER MOBILE NUMBER
           ---------------------------------------------------- */
.mobile-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(25, 8, 48, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mobile-modal-card {
    width: 100%;
    max-width: 340px;
    background: #ffffff;
    border-radius: 24px;
    padding: 34px 22px 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Top Right Corner Language Switcher inside Modal Card */
.modal-lang-switch {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 18px;
    padding: 2px;
    border: 1px solid #e2e8f0;
    z-index: 10;
}

.lang-btn {
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 14px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: #5A11B8;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(90, 17, 184, 0.25);
}

/* Top Right Language Switcher in Chat Header */
.header-lang-switch {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2px;
    margin-right: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-lang-btn {
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
}

.chat-lang-btn.active {
    background: #ffffff;
    color: #5A11B8;
    font-weight: 800;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

@keyframes scaleUp {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-headline {
    color: #5A11B8;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 22px;
}

.modal-input-wrap {
    margin-bottom: 18px;
}

.modal-input {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    border: 2px solid #d8b4fe;
    border-radius: 14px;
    outline: none;
    color: #1e293b;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input:focus {
    border-color: #5A11B8;
    box-shadow: 0 0 0 4px rgba(90, 17, 184, 0.15);
}

.modal-input::placeholder {
    color: #94a3b8;
}

.modal-btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6c15d4 0%, #5A11B8 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(90, 17, 184, 0.4);
    transition: transform 0.15s, background 0.15s;
}

.modal-btn-submit:active {
    transform: scale(0.97);
}

.modal-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

/* WhatsApp-style Animated Typing Bubble & Dots */
.typing-indicator-row {
    animation: fadeInTyping 0.25s ease-out;
    margin: 6px 0;
    display: flex;
}

.typing-indicator-row.bot,
.typing-indicator-row.admin {
    justify-content: flex-start;
}

.typing-indicator-row.user {
    justify-content: flex-end;
}

@keyframes fadeInTyping {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

.typing-bubble {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    min-width: 60px !important;
    border-radius: 18px 18px 18px 4px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 14px;
}

.typing-dots .dot {
    width: 7.5px;
    height: 7.5px;
    background: #a855f7;
    border-radius: 50%;
    display: inline-block;
    animation: typingWave 1.3s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: 0.18s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes typingWave {

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

    30% {
        transform: translateY(-5px);
        opacity: 1;
        background: #7c3aed;
    }
}

.header-status-typing {
    color: #4ade80 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    animation: pulseTypingText 1.2s infinite ease-in-out !important;
}

@keyframes pulseTypingText {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

/* Balanced & Responsive Adjustments for Mobile Screens */
@media (max-width: 480px) {
    .chat-header {
        min-height: 50px;
        padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px 8px;
    }

    .avatar-wrap {
        width: 36px;
        height: 36px;
    }

    .header-title {
        font-size: 16px;
    }

    .encryption-banner {
        padding: 7px 10px;
        margin: 4px 8px 4px;
        font-size: 11px;
        line-height: 1.35;
        border-radius: 12px;
        gap: 8px;
    }

    .encryption-banner .enc-icon {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .top-action-pills-bar {
        gap: 6px;
        margin: 2px 8px 5px;
    }

    .action-pill-btn {
        height: 35px;
        font-size: 15.5px;
        font-weight: 800;
        padding: 0 4px;
    }

    .chat-body {
        padding: 5px 8px;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .action-pill-btn {
        height: 35px;
        font-size: 15.5px;
        letter-spacing: 0;
    }

    .encryption-banner {
        font-size: 10px;
        padding: 5px 8px;
    }
}