.ckb-widget { position: fixed; right: 15px; bottom: 85px; z-index: 950; font-family: inherit; }

.ckb-icon {
    width: 58px; height: 58px; border-radius: 50%;
    background-color: var(--main); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25);
    transition: background-color .25s;
}
.ckb-icon:hover { background-color: var(--main-light); }

.ckb-bubble {
    position: absolute; right: 68px; bottom: 8px; max-width: 220px;
    background: #fff; color: #222; padding: 10px 26px 10px 14px;
    border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
    font-size: 14px; line-height: 1.4;
}
.ckb-bubble-close {
    position: absolute; top: 2px; right: 8px; cursor: pointer;
    color: #999; font-size: 16px;
}

.ckb-panel {
    position: absolute; right: 0; bottom: 72px;
    width: 340px; max-width: calc(100vw - 30px);
    height: 480px; max-height: 70vh;
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.28);
    display: flex; flex-direction: column;
}

.ckb-header {
    background-color: var(--main); color: #fff;
    padding: 14px 16px; font-weight: 600; font-size: 16px;
    display: flex; justify-content: space-between; align-items: center;
}
.ckb-close { cursor: pointer; font-size: 20px; line-height: 1; }

.ckb-body { flex: 1; overflow-y: auto; padding: 16px; }

.ckb-loichao { font-size: 14px; color: #555; margin-bottom: 14px; }

.ckb-input {
    width: 100%; border: 1px solid #ddd; border-radius: 8px;
    padding: 9px 12px; font-size: 14px; margin-bottom: 10px; box-sizing: border-box;
}
.ckb-textarea { resize: vertical; min-height: 70px; }

.ckb-btn-submit {
    width: 100%; background-color: var(--main); color: #fff; border: 0;
    border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 600;
    cursor: pointer; margin-bottom: 8px;
}
.ckb-btn-submit:hover { background-color: var(--main-light); }

.ckb-btn-google {
    width: 100%; background: #fff; color: #444; border: 1px solid #ddd;
    border-radius: 8px; padding: 9px; font-size: 13px; cursor: pointer;
}
.ckb-btn-google:hover { background: #f5f5f5; }

.ckb-error { color: #e0332e; font-size: 13px; margin-top: 8px; }

.ckb-chat { display: flex; flex-direction: column; padding: 0; }

.ckb-lienhe-banner {
    background: #fff8e1; color: #7a5c00; font-size: 13px;
    padding: 10px 14px; border-bottom: 1px solid #f0e0a0;
}
.ckb-lienhe-banner a { color: var(--main-dark); font-weight: 600; }

.ckb-messages { flex: 1; overflow-y: auto; padding: 14px; }

.ckb-msg {
    max-width: 85%; padding: 9px 12px; border-radius: 12px;
    font-size: 14px; line-height: 1.45; margin-bottom: 10px; word-wrap: break-word;
}
.ckb-msg-khach {
    background-color: var(--main); color: #fff;
    margin-left: auto; border-bottom-right-radius: 2px;
}
.ckb-msg-ai {
    background: #f0f1f3; color: #222;
    margin-right: auto; border-bottom-left-radius: 2px;
}
.ckb-msg-loi {
    background: #fdecea; color: #b3261e;
    margin-right: auto; border-bottom-left-radius: 2px;
}

.ckb-loading { padding: 0 14px 8px; font-size: 13px; color: #888; }

.ckb-inputrow {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-top: 1px solid #eee;
}
.ckb-inputrow .ckb-input { margin-bottom: 0; }
.ckb-btn-send {
    width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none;
    background-color: var(--main); color: #fff; cursor: pointer;
}
.ckb-btn-send:hover { background-color: var(--main-light); }

@media (max-width: 480px) {
    .ckb-panel { width: calc(100vw - 20px); right: -6px; }
    .ckb-widget { right: 10px; }
}
