.genkot-chat,
.genkot-chat * {
    box-sizing: border-box;
}

.genkot-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    font-family: Arial, sans-serif;
}

.genkot-chat__launcher {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 54px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: #252525;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
}

.genkot-chat__launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 35px rgba(0, 0, 0, .28);
}

.genkot-chat__launcher-icon {
    font-size: 21px;
}

.genkot-chat .genkot-chat__window {
    position: absolute;
    right: 0;
    bottom: 70px;
    display: none;
    flex-direction: column;
    width: min(450px, calc(100vw - 32px))!important;
    height: min(500px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}


.genkot-chat .genkot-chat__window {
    padding-top: unset;
    padding-bottom: unset;
}

.genkot-chat__window.is-open {
    display: flex;
}

.genkot-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 18px;
    background: #252525;
    color: #fff;
}

.genkot-chat__title {
    font-size: 17px;
    font-weight: 700;
}

.genkot-chat__status {
    margin-top: 3px;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
}

.genkot-chat__close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.genkot-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #f4f4f4;
}

.genkot-chat__message {
    width: fit-content;
    max-width: 86%;
    margin-bottom: 12px;
    padding: 11px 14px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.genkot-chat__message--bot {
    border-bottom-left-radius: 4px;
    background: #fff;
    color: #252525;
}

.genkot-chat__message--user {
    margin-left: auto;
    border-bottom-right-radius: 4px;
    background: #252525;
    color: #fff;
}

.genkot-chat__message--loading {
    color: #777;
    font-style: italic;
}

.genkot-chat__message--error {
    color: #a30000;
}

.genkot-chat__form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 12px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.genkot-chat__input {
    display: block;
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    padding: 11px 13px;
    border: 1px solid #ccc;
    border-radius: 12px;
    outline: none;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.genkot-chat__input:focus {
    border-color: #252525;
}

.genkot-chat__send {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #252525;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

.genkot-chat__send:disabled,
.genkot-chat__input:disabled {
    cursor: wait;
    opacity: .6;
}

.genkot-chat__notice {
    padding: 0 12px 10px;
    background: #fff;
    color: #888;
    text-align: center;
    font-size: 10px;
}


@media (max-width: 600px) {
    .genkot-chat {
        right: 14px;
        bottom: 14px;
    }

    .genkot-chat__launcher-text {
        display: none;
    }

    .genkot-chat__launcher {
        width: 56px;
        padding: 0;
        justify-content: center;
    }

    .genkot-chat__window {
        position: fixed;
        inset: 10px;
        width: auto;
        height: auto;
        border-radius: 16px;
    }
}
