#kp-ai-chat-root,
#kp-ai-chat-root * {
    box-sizing: border-box;
}

#kp-ai-chat-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#kp-ai-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;

    height: 54px;
    padding: 0 20px;

    border: 0;
    border-radius: 28px;

    background: #C446FF;
    color: #ffffff;

    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

#kp-ai-chat-window {
    position: fixed;
    right: 24px;
    bottom: 90px;
    z-index: 999999;

    width: 390px;
    height: 610px;

    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    box-shadow: 0 18px 60px rgba(0,0,0,.22);

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);

    transition: .2s ease;
}

#kp-ai-chat-window.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kp-ai-header {
    flex-shrink: 0;
    padding: 16px 18px;

    background: #111111;
    color: #ffffff;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kp-ai-header-left {
    display: flex;
    align-items: center;
    gap: 11px;
}

.kp-ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;

    background: #C446FF;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
}

.kp-ai-title {
    font-size: 15px;
    font-weight: 700;
}

.kp-ai-status {
    margin-top: 3px;
    font-size: 11px;
    color: rgba(255,255,255,.65);
}

.kp-ai-status span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;

    border-radius: 50%;
    background: #48d597;
}

.kp-ai-close {
    border: 0;
    background: transparent;
    color: #ffffff;

    font-size: 27px;
    cursor: pointer;
}

.kp-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;

    background: #f7f7f8;
}

.kp-ai-message {
    display: flex;
    margin-bottom: 14px;
}

.kp-ai-bubble {
    max-width: 85%;

    padding: 12px 14px;

    border-radius: 15px 15px 15px 4px;

    background: #ffffff;
    color: #222222;

    font-size: 14px;
    line-height: 1.5;

    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.kp-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.kp-ai-suggestions button {
    border: 1px solid #e2e2e5;
    background: #ffffff;
    color: #333333;

    padding: 8px 11px;
    border-radius: 18px;

    font-size: 12px;
    cursor: pointer;
}

#kp-ai-chat-form {
    flex-shrink: 0;

    padding: 12px;

    background: #ffffff;
    border-top: 1px solid #eeeeee;

    display: flex;
    gap: 8px;
}

#kp-ai-chat-input {
    flex: 1;
    min-width: 0;

    height: 44px;
    padding: 0 14px;

    border: 1px solid #dddddf;
    border-radius: 22px;

    background: #f8f8f9;

    outline: none;
    font-size: 14px;
}

#kp-ai-chat-input:focus {
    border-color: #C446FF;
    background: #ffffff;
}

#kp-ai-chat-form button {
    flex: 0 0 44px;

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 50%;

    background: #C446FF;
    color: #ffffff;

    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 600px) {

#kp-ai-chat-launcher {
    right: 16px;
    bottom: 16px;

    width: auto;
    min-width: 190px;
    height: 52px;

    padding: 0 18px;

    border-radius: 26px;

    justify-content: center;
}

.kp-ai-launcher-text {
    display: inline;
}

    #kp-ai-chat-window {
        right: 0;
        bottom: 0;

        width: 100%;
        height: 100dvh;

        border-radius: 0;
    }
}
