.si-chat {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1000000;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #122326;
    line-height: 1.4;
}

.si-chat__open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: #0e4d4f;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(14, 77, 79, 0.28);
}

.si-chat__mark {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0a106;
}

.si-chat__panel {
    position: absolute;
    left: 0;
    bottom: 58px;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    height: min(540px, calc(100vh - 110px));
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(14, 77, 79, 0.24);
}

.si-chat__panel[hidden] {
    display: none !important;
}

.si-chat__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 14px 12px;
    background: #0e4d4f;
    color: #fff;
}

.si-chat__bar div {
    flex: 1;
    min-width: 0;
}

.si-chat__bar strong,
.si-chat__bar span {
    display: block;
}

.si-chat__bar span {
    opacity: 0.78;
    font-size: 0.82rem;
}

.si-chat__bar button {
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.si-chat__bar button[data-reset] {
    font-size: 0.78rem;
    text-decoration: underline;
}

.si-chat__bar button[data-close] {
    font-size: 1.4rem;
    line-height: 1;
}

.si-chat__thread {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #f4f8f8;
}

.si-chat__bubble {
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 16px;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.si-chat__bubble.is-user {
    margin-left: auto;
    background: #14686b;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.si-chat__bubble.is-assistant,
.si-chat__bubble.is-pending {
    background: #fff;
    border-bottom-left-radius: 4px;
}

.si-chat__bubble.is-note,
.si-chat__bubble.is-error {
    align-self: center;
    max-width: 100%;
    background: transparent;
    color: #5b6d70;
    font-size: 0.82rem;
    text-align: center;
}

.si-chat__bubble.is-error {
    color: #9b1c1c;
}

.si-chat__form {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e2ecec;
}

.si-chat__form input[type="text"] {
    flex: 1;
    min-width: 0;
    border: 1px solid #c5d5d5;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: #122326;
    background: #fff;
}

.si-chat__form button {
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #e0a106;
    color: #122326;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.si-chat__form button:disabled,
.si-chat__open:disabled {
    opacity: 0.6;
    cursor: wait;
}

.si-chat__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
