﻿.ai-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--bs-primary);
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1055;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease-in-out;
}
.ai-floating-button:hover {
    transform: scale(1.08);
}
.ai-panel-overlay {
    position: fixed;
    top: var(--bs-header-height);
    right: -420px;
    width: 400px;
    max-width: 100vw;
    height: calc(100vh - var(--bs-header-height));
    box-shadow: -4px 0 16px rgba(0,0,0,0.15);
    z-index: 1056;
    transition: right 0.25s ease-in-out;
}
.ai-panel-overlay.open {
    right: 0;
}
.ai-panel-overlay .card {
    height: 100vh;
}
.ai-panel-header {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    padding:0 !important;
}
.ai-panel-header-usage {
    background-color: var(--bs-light);
    padding: 0.5rem 1rem 0.5rem 1rem;
    font-size:0.7rem;
}
.ai-panel-header .avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius:8px;
    background-color: #FFF;
    color: #6c757d;
    font-size: 0.95rem;    
}
.ai-panel-header .avatar img {
    width:30px;
}
.ai-panel-header .title {
    font-size: 0.96rem;
    line-height: 1.1;
}
.ai-panel-header .badge {
    background-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.22rem 0.45rem;
}
.ai-panel-header .subtitle {
    font-size: 0.72rem;
    line-height: 1.1;
    opacity: 0.95;
}
.ai-panel-header .close {
    color: #fff !important;
}
.ai-panel-header .close:hover {    
    opacity: 0.85;
}
.ai-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background-color: var(--bs-body-bg-content, var(--bs-light));
}
.ai-bubble {
    max-width: 85%;
    padding: 0.55rem 0.85rem;
    border-radius: 0.9rem;
    font-size: 0.80rem;
    line-height: 1.35;
}
.ai-bubble .text {
    /*white-space: pre-wrap;*/
    word-break: break-word;
}
.ai-bubble .text p{
    /*margin-bottom: 0.5rem;*/
}
.ai-bubble .time {
    font-size: 0.65rem;
    margin-top: 0.2rem;
    text-align: right;
}
.ai-bubble.user {
    background-color: var(--bs-primary);
    color: #fff;
    border-bottom-right-radius: 0.2rem;
}
.ai-bubble.agent {
    background-color: #fff;
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-bottom-left-radius: 0.2rem;
}
.ai-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 0.2rem 0;
}
.ai-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--bs-secondary-color);
    animation: ai-typing-bounce 1s infinite ease-in-out;
}
.ai-typing span:nth-child(2) {
    animation-delay: 0.15s;
}
.ai-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes ai-typing-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-4px);
    }
}
.ai-faq-list .btn {
    font-size: 0.78rem;
}
.ai-textbox {
    font-size: 0.80rem !important;
}
.ai-send-button {
    flex-shrink: 0;
}
.ai-footer-text {
    font-size: 0.50rem;
}

@media (max-width: 768px) {
    .ai-panel-overlay {
        width: 100vw;
        right: -100vw;
    }
    .ai-panel-overlay.open {
        right: 0;
    }
}
