.ft-chatbot {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    font-family: 'Inter', system-ui, sans-serif;
}

.ft-chatbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ft-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.42);
}

.ft-chatbot-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.ft-chatbot-toggle-icon--close {
    display: none;
}

.ft-chatbot.is-open .ft-chatbot-toggle-icon--open {
    display: none;
}

.ft-chatbot.is-open .ft-chatbot-toggle-icon--close {
    display: inline-block;
}

.ft-chatbot-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(22rem, calc(100vw - 2rem));
    height: min(32rem, calc(100vh - 6rem));
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.1rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
}

.ft-chatbot-header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.ft-chatbot-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.ft-chatbot-title {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
}

.ft-chatbot-subtitle {
    display: block;
    font-size: 0.75rem;
    opacity: 0.88;
}

.ft-chatbot-close {
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ft-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8fafc;
}

.ft-chatbot-msg {
    max-width: 88%;
    padding: 0.7rem 0.85rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
}

.ft-chatbot-msg--bot {
    align-self: flex-start;
    background: #fff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom-left-radius: 0.25rem;
}

.ft-chatbot-msg--user {
    align-self: flex-end;
    background: #4f46e5;
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.ft-chatbot-msg--typing {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ft-chatbot-msg--typing span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #94a3b8;
    animation: ft-chatbot-bounce 1.2s infinite ease-in-out;
}

.ft-chatbot-msg--typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.ft-chatbot-msg--typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes ft-chatbot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.ft-chatbot-tools {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.ft-chatbot-tool {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ft-chatbot-tool:hover {
    border-color: rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
    color: inherit;
}

.ft-chatbot-tool strong {
    display: block;
    font-size: 0.82rem;
    color: #312e81;
}

.ft-chatbot-tool small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.35;
}

.ft-chatbot-tool-meta {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ft-chatbot-quick {
    display: flex;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ft-chatbot-quick::-webkit-scrollbar {
    display: none;
}

.ft-chatbot-chip {
    border: 1px solid rgba(79, 70, 229, 0.18);
    background: #eef2ff;
    color: #4338ca;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    white-space: nowrap;
    cursor: pointer;
}

.ft-chatbot-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    background: #fff;
}

.ft-chatbot-input {
    flex: 1;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    outline: none;
}

.ft-chatbot-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.ft-chatbot-send {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.ft-chatbot-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    .ft-chatbot {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .ft-chatbot-toggle-label {
        display: none;
    }

    .ft-chatbot-toggle {
        width: 3.25rem;
        height: 3.25rem;
        padding: 0;
        justify-content: center;
    }

    .ft-chatbot-panel {
        width: calc(100vw - 1.5rem);
        height: min(70vh, 32rem);
    }
}
