.cotg-chat {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 10020;
    font-family: "DM Sans", "Segoe UI", sans-serif;
}

.cotg-chat__launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 58px;
    padding: 0 18px 0 8px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(145deg, #ffb15a, #fe7c06 55%, #e86a00);
    color: #fff;
    box-shadow: 0 14px 32px rgba(254, 124, 6, 0.35);
    cursor: pointer;
}

.cotg-chat__launcher-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #e86a00;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.cotg-chat__launcher-mark svg {
    display: block;
}

.cotg-chat__launcher-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cotg-chat__panel {
    display: none;
    position: absolute;
    left: 0;
    bottom: 72px;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 140px));
    overflow: hidden;
    border-radius: 28px;
    background: #fffdfb;
    border: 1px solid rgba(254, 124, 6, 0.22);
    box-shadow: 0 24px 60px rgba(35, 31, 32, 0.18);
    flex-direction: column;
}

.cotg-chat.is-open .cotg-chat__panel {
    display: flex;
}

.cotg-chat__panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffb15a, #fe7c06 55%, #e86a00);
}

.cotg-chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 16px 14px;
    background: linear-gradient(180deg, #2a211c, #1c1917);
    color: #fff;
}

.cotg-chat__title {
    margin: 0;
    font-size: 16px;
    font-weight: 750;
}

.cotg-chat__sub {
    margin: 2px 0 0;
    color: #ffd7b3;
    font-size: 12px;
}

.cotg-chat__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.cotg-chat__log {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background:
        radial-gradient(420px 160px at 0% 0%, rgba(254, 124, 6, 0.08), transparent 70%),
        #fffdfb;
}

.cotg-chat__msg {
    max-width: 86%;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.cotg-chat__msg--bot {
    align-self: flex-start;
    background: linear-gradient(165deg, #ffffff, #fff4ea);
    border: 1px solid rgba(254, 124, 6, 0.16);
    color: #231f20;
}

.cotg-chat__msg--user {
    align-self: flex-end;
    background: linear-gradient(145deg, #ffb15a, #fe7c06);
    color: #fff;
}

.cotg-chat__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 10px;
}

.cotg-chat__chip {
    border: 1px solid rgba(254, 124, 6, 0.28);
    background: #fff;
    color: #231f20;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cotg-chat__form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(254, 124, 6, 0.12);
    background: #fff;
}

.cotg-chat__input {
    flex: 1;
    min-height: 46px;
    max-height: 120px;
    border: 1px solid rgba(254, 124, 6, 0.2);
    border-radius: 18px;
    padding: 12px 14px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    overflow-y: auto;
}

.cotg-chat__send {
    height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: #231f20;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cotg-chat__honeypot {
    position: absolute;
    left: -9999px;
}

@media (max-width: 767px) {
    .cotg-chat {
        left: 15px;
        bottom: 88px;
    }

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

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

    .cotg-chat__panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 156px;
        width: auto;
        height: min(520px, calc(100vh - 180px));
    }
}
