.aic-chat-root {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.aic-chat-root--bottom-right {
    right: 20px;
    bottom: 20px;
}

.aic-chat-root--bottom-left {
    left: 20px;
    bottom: 20px;
}

.aic-chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: #2271b1;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    font-weight: 600;
}

.aic-chat-toggle:hover {
    background: #135e96;
}

.aic-chat-panel {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: min(380px, calc(100vw - 32px));
    height: 520px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.aic-chat-root--bottom-left .aic-chat-panel {
    right: auto;
    left: 0;
}

.aic-chat-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
}

.aic-chat-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #50575e;
}

.aic-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fff;
}

.aic-chat-message {
    margin-bottom: 12px;
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.aic-chat-message--user {
    margin-left: auto;
    background: #2271b1;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.aic-chat-message--assistant {
    margin-right: auto;
    background: #f0f0f1;
    color: #1d2327;
    border-bottom-left-radius: 4px;
}

.aic-chat-message--error {
    margin-right: auto;
    background: #fcf0f1;
    color: #8a2424;
}

.aic-chat-message--typing {
    margin-right: auto;
    background: #f0f0f1;
    color: #646970;
    font-style: italic;
}

.aic-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #dcdcde;
    background: #fff;
}

.aic-chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #c3c4c7;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

.aic-chat-send {
    border: 0;
    border-radius: 10px;
    padding: 0 16px;
    background: #2271b1;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.aic-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aic-chat-embed {
    max-width: 720px;
    border: 1px solid #dcdcde;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.aic-chat-embed__header {
    padding: 14px 16px;
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
}

.aic-chat-messages--embed {
    min-height: 320px;
    max-height: 480px;
}

.aic-chat-form--embed {
    border-top: 1px solid #dcdcde;
}
