.fba-chat {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fba-chat__toggle {
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background: #111827;
    color: #fff;
}

.fba-chat__window {
    display: none;
    width: min(360px, calc(100vw - 2rem));
    height: 520px;
    margin-bottom: 0.7rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.fba-chat.is-open .fba-chat__toggle {
    display: none;
}

.fba-chat.is-open .fba-chat__window {
    margin-bottom: 0;
}

.fba-chat__window.is-open {
    display: flex;
    flex-direction: column;
}

.fba-chat__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.fba-chat__header h3 {
    margin: 0;
    font-size: 1rem;
}

.fba-chat__close {
    border: 0;
    background: #f3f4f6;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.fba-chat__messages {
    flex: 1;
    padding: 0.9rem;
    overflow: auto;
    background: #fff;
}

.fba-chat__message {
    max-width: 92%;
    margin: 0 0 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 16px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.fba-chat__message--bot {
    background: #f3f4f6;
}

.fba-chat__message--user {
    margin-left: auto;
    background: #111827;
    color: #fff;
}

.fba-chat__form {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.fba-chat__input {
    flex: 1;
    min-width: 0;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.6rem 0.9rem;
}

.fba-chat__send {
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    background: #111827;
    color: #fff;
    cursor: pointer;
}
