/* Assistant typing animation - 3 dots wave */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typing-wave 1.4s ease-in-out infinite;
}

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

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

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

/* Message bubble with timestamp */
.bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-text {
    word-wrap: break-word;
}

/* Message timestamp styling - inside bubble at bottom corner */
.message-time {
    font-size: 0.65rem;
    color: #9ca3af;
    opacity: 0.8;
    margin-top: 2px;
    align-self: flex-end;
}

.message.user .message-time {
    align-self: flex-start;
    color: white;
}

.message.assistant .message-time {
    align-self: flex-end;
}

/* Assistant Launcher (bottom-right) */
.assistant-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #d3ddda;   
    border: none; 
    z-index: 10000;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.3s ease;
    animation: floatBounceAnimation 3s ease-in-out infinite;
}

.assistant-launcher:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    animation-play-state: paused;
}

@keyframes floatBounceAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.assistant-launcher img {
    /* max-width: 100%;
    height: 100%;
    object-fit: none; */
    max-width: 46px; 
    margin-bottom: 4px;
}

.assistant-launcher .bot-icon { width: 90%; height: 90%; display: block; }

.assistant-launcher:hover { transform: translateY(-2px); }

/* Bot animations */
.assistant-launcher .bot-eye {
    animation: blink 4s infinite;
    transform-origin: center;
}
.assistant-launcher .bot-eye.right { animation-delay: .15s; }

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.15); }
}

.assistant-launcher .bot-antenna {
    animation: ping 2.2s ease-in-out infinite;
}
@keyframes ping {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: .7; transform: translateY(-2px); }
}

.assistant-launcher .bot-glow { animation: glowPulse 2.8s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { opacity: .15; }
  50% { opacity: .28; }
}

/* Assistant Modal */
.assistant-modal {
    position: fixed;
    inset: 0;
    /* background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px); */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.assistant-modal.show { 
    display: flex; 
    align-items: end;
    justify-content: right;
    /* bottom: 32px;
    right: 112px; */
}

.assistant-dialog {
    border-radius: 14px;
    height: 600px;
    width: 722px;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: chatbot-slideIn .3s ease-out;
    margin-right: 112px;
    margin-bottom: 32px;
}

@keyframes chatbot-slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.assistant-header { 
    padding: 16px 20px; 
    /* background: rgba(255,255,255,0.55);  */
}

.assistant-header .bot-icon {
    max-width: 24px;
    max-height: 24px;
    filter: invert(0.3);
}

.assistant-logo { height: 22px; width: 22px; border-radius: 50%; object-fit: cover; display: inline-block; }
.assistant-title { font-weight: 600; color: #1b1c1e; font-size: 14px; }
.assistant-close { 
    background: transparent; 
    border: 0; 
    font-size: 26px; 
    line-height: 1; 
    color: rgb(126 153 145);
}

.assistant-body { 
    padding: 20px; 
    overflow: hidden;
    min-height: 0;
}
.assistant-body h6 { font-size: 20px; }
.assistant-chat { 
    /* height: 48vh; min-height: 280px; max-height: 58vh;  */
    overflow-y: auto; 
    overflow-x: hidden;
    padding-right: 6px; 
    min-height: 0;
}
.assistant-messages { display: flex; flex-direction: column; gap: 16px; }
.message { display: flex; }
.message.assistant { justify-content: flex-start; }
.message.user { justify-content: flex-end; }
.bubble { max-width: 80%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.message.assistant .bubble:not(.loading-bubble) { background: #ffffff; color: #111; box-shadow: 0 1px 0 rgba(0,0,0,0.05); }
.message.user .bubble:not(.loading-bubble) { background: #007AFF; color: #fff; }

.assistant-quick { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-top: 12px; 
}

.assistant-quick .chip { 
    flex: 1;
    background: #d3ddda; 
    color: #4d5c7c; 
    border: 0; 
    padding: 20px; 
    border-radius: 12px; 
    font-size: 12px; 
    justify-content: space-between;
    height: 125px;
}

.assistant-quick .chip img {
    width: 100%;
    height: 50px;
    align-self: center;
    object-fit: contain;
}

.assistant-footer { 
    padding: 20px 24px; 
}
.assistant-input { 
    display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 12px; 
    padding: 20px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); 
    height: 60px;
}
.assistant-input input { height: 60px; flex: 1; border: 0; outline: none; font-size: 14px; background: transparent; }
.assistant-send { 
    /* background: #007AFF;  */
    background-color: transparent;
    color: rgba(166, 198, 189, 1); 
    border: 0; 
    border-radius: 10px; 
    padding: 0;
}
.assistant-send { 
    transform: rotate(90deg);
}

.question-suggestions {
    line-height: 2.5;
}

/* Welcome Toast */
.assistant-welcome-toast {
    position: fixed;
    bottom: 40px;
    right: 110px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 16px 40px 16px 20px;
    max-width: 320px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.assistant-welcome-toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.assistant-welcome-toast.hide {
    opacity: 0;
    transform: translateX(20px);
}

.assistant-welcome-toast::before {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #333;
}

@media (max-width: 575px) {
    .assistant-launcher { 
        right: 16px; 
        bottom: 16px;
        width: 56px;
        height: 56px;
    }
    .assistant-launcher img {
        max-width: 38px;
    }
    /* .chat-icon-animated {
        width: 38px;
        height: 38px;
    }
    .chat-bubble-main {
        width: 26px;
        height: 22px;
        top: 8px;
        left: 2px;
    }
    .chat-bubble-secondary {
        width: 17px;
        height: 15px;
        top: 8px;
        right: 2px;
    }
    .typing-dots {
        gap: 2px;
    }
    .typing-dots span {
        width: 3.5px;
        height: 3.5px;
    }
    .curved-line {
        width: 9px;
        height: 9px;
    } */
    .assistant-welcome-toast {
        right: 80px;
        bottom: 20px;
        max-width: 200px;
        padding: 12px 32px 12px 12px;
    }
    .toast-message {
        font-size: 12px;
        line-height: 1.4;
    }
    .toast-close {
        top: 4px;
        right: 8px;
        font-size: 20px;
    }
    .assistant-welcome-toast::before {
        right: -6px;
        bottom: 24px;
        border-left: 8px solid white;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
    }
}


/* .chat-icon-animated {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bubble {
    position: absolute;
    background: white;
    border: 2.5px solid #2c4a6f;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-bubble-main {
    width: 30px;
    height: 26px;
    top: 10px;
    left: 2px;
    z-index: 2;
    animation: bubble-left-to-right 2.5s ease-in-out infinite;
}

.chat-bubble-main::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 4px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 0px solid transparent;
    border-top: 6px solid #1e3a5f;
}

.chat-bubble-main::after {
    content: '';
    position: absolute;
    bottom: -3.5px;
    left: 5.5px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 0px solid transparent;
    border-top: 4px solid white;
}

.chat-bubble-secondary {
    width: 20px;
    height: 18px;
    top: 10px;
    right: 2px;
    z-index: 1;
    animation: bubble-right-to-left 2.5s ease-in-out infinite;
}

.chat-bubble-secondary::before {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 3px;
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-left: 0px solid transparent;
    border-top: 5px solid #1e3a5f;
}

.chat-bubble-secondary::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 4.5px;
    width: 0;
    height: 0;
    border-right: 3px solid transparent;
    border-left: 0px solid transparent;
    border-top: 3px solid white;
}

.typing-dots {
    display: flex;
    gap: 2.5px;
    padding: 2px;
    align-items: center;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff9147;
    animation: typing-pulse 1.6s ease-in-out infinite;
}

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

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

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

.curved-line {
    position: absolute;
    width: 11px;
    height: 11px;
    top: -2px;
    right: -1px;
    border: 2px solid #ff9147;
    border-left: transparent;
    border-bottom: transparent;
    border-radius: 0 10px 0 0;
    animation: line-appear 2.5s ease-in-out infinite;
}

@keyframes typing-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes bubble-left-to-right {
    0% {
        transform: translateX(0) scale(0.9);
        opacity: 0.7;
    }
    25% {
        transform: translateX(8px) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(12px) scale(1.05);
        opacity: 1;
    }
    75% {
        transform: translateX(8px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(0.9);
        opacity: 0.7;
    }
}

@keyframes bubble-right-to-left {
    0% {
        transform: translateX(0) scale(0.9);
        opacity: 0.7;
    }
    25% {
        transform: translateX(-8px) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-12px) scale(1.05);
        opacity: 1;
    }
    75% {
        transform: translateX(-8px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(0.9);
        opacity: 0.7;
    }
}

@keyframes line-appear {
    0% {
        opacity: 0.6;
        transform: scale(0.9);
    }
    25% {
        opacity: 1;
        transform: scale(1.1);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    75% {
        opacity: 0.8;
        transform: scale(0.95);
    }
    100% {
        opacity: 0.6;
        transform: scale(0.9);
    }
} */
