.lk-support-chat {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lk-support-chat__fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #FF5900;
    color: #fff;
    z-index: 1070;
    cursor: pointer;
}

.lk-support-chat__fab-icon {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0 auto;
    border: 2px solid #fff;
    border-radius: 4px;
    position: relative;
}

.lk-support-chat__fab-icon:after {
    content: "";
    position: absolute;
    left: 5px;
    bottom: -6px;
    border: 5px solid transparent;
    border-top-color: #fff;
}

.lk-support-chat__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #0f3e56;
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    font-weight: 700;
}

.lk-support-chat__panel {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 84px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border: 1px solid rgba(15, 62, 86, 0.16);
    border-radius: 12px;
    z-index: 1070;
    flex-direction: column;
    overflow: hidden;
}

.lk-support-chat__panel.is-open {
    display: flex;
}

.lk-support-chat__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #0f3e56;
    color: #fff;
}

.lk-support-chat__title {
    font-weight: 700;
    font-size: 15px;
}

.lk-support-chat__subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.lk-support-chat__close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.lk-support-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f5f6f8;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lk-support-chat__msg {
    max-width: 92%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.lk-support-chat__msg--client {
    align-self: flex-end;
    background: #fff8f3;
    border-color: rgba(255, 89, 0, 0.22);
}

.lk-support-chat__msg--bot,
.lk-support-chat__msg--operator {
    align-self: flex-start;
    background: #eef6fb;
    border-color: rgba(15, 62, 86, 0.12);
}

.lk-support-chat__msg-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.lk-support-chat__msg-body {
    font-size: 14px;
    line-height: 1.4;
    color: #222;
    white-space: normal;
    word-break: break-word;
}

.lk-support-chat__msg-body a {
    color: #FF5900;
    text-decoration: underline;
    word-break: break-all;
}

.lk-support-chat__msg-files a {
    display: block;
    color: #FF5900;
    font-size: 12px;
    word-break: break-all;
}

.lk-support-chat__msg-edit {
    display: inline-block;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0f3e56;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.lk-support-chat__msg-editbox {
    margin-top: 6px;
}

.lk-support-chat__msg-editor {
    width: 100%;
    min-height: 64px;
    border: 1px solid rgba(15, 62, 86, 0.2);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 14px;
    resize: vertical;
}

.lk-support-chat__msg-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.lk-support-chat__msg-save,
.lk-support-chat__msg-cancel {
    border: 0;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.lk-support-chat__msg-save {
    background: #FF5900;
    color: #fff;
}

.lk-support-chat__msg-cancel {
    background: #eef6fb;
    color: #0f3e56;
}

.lk-support-chat__form {
    padding: 10px 12px 12px;
    background: #fff;
    border-top: 1px solid rgba(15, 62, 86, 0.1);
}

.lk-support-chat__input {
    width: 100%;
    border: 1px solid rgba(15, 62, 86, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    resize: none;
}

.lk-support-chat__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.lk-support-chat__file {
    position: relative;
    overflow: hidden;
    font-size: 12px;
    color: #0f3e56;
    cursor: pointer;
    margin: 0 auto 0 0;
    padding: 7px 12px;
    border-radius: 8px;
    background: #eef6fb;
}

.lk-support-chat__file input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.lk-support-chat__file-list {
    min-height: 16px;
    margin-top: 6px;
    font-size: 12px;
    color: #0f3e56;
    word-break: break-all;
}

.lk-support-chat__ghost,
.lk-support-chat__send {
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
}

.lk-support-chat__ghost {
    margin-left: 0;
    background: #eef6fb;
    color: #0f3e56;
}

.lk-support-chat__call {
    margin-top: 8px;
}

.lk-support-chat__call-label {
    font-size: 12px;
    color: #0f3e56;
    margin-bottom: 4px;
}

.lk-support-chat__call-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lk-support-chat__call-prefix {
    flex: 0 0 auto;
    min-width: 22px;
    font-weight: 700;
    font-size: 16px;
    color: #0f3e56;
}

.lk-support-chat__call-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(15, 62, 86, 0.2);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 14px;
}

.lk-support-chat__call-input:focus {
    outline: none;
    border-color: #FF5900;
}

.lk-support-chat__send {
    background: #FF5900;
    color: #fff;
}

.lk-support-chat__send:disabled,
.lk-support-chat__ghost:disabled {
    opacity: 0.6;
    cursor: default;
}

.lk-support-chat__hint {
    min-height: 16px;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.lk-support-chat__hint.is-error {
    color: #b42318;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .lk-support-chat__panel.is-open {
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .lk-support-chat__fab {
        right: 14px;
        bottom: 14px;
    }
}
