#csw-root { position: fixed; right: 20px; bottom: 20px; z-index: 1050; font-family: inherit; }
#csw-bubble {
    width: 60px; height: 60px; border-radius: 50%; border: none;
    background: var(--brand-primary, #dc3545); color: var(--brand-on-primary, #fff); font-size: 26px; box-shadow: 0 4px 14px rgba(0,0,0,.25);
    cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center;
}
#csw-bubble:hover { filter: brightness(0.9); }
.csw-badge {
    position: absolute; top: -4px; right: -4px; background: #ffc107; color: #212529;
    font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff;
}
#csw-panel {
    position: fixed; right: 20px; bottom: 92px; width: 340px; max-width: calc(100vw - 40px);
    height: 460px; max-height: calc(100vh - 140px); background: #fff; border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden;
}
#csw-header {
    background: var(--brand-primary, #dc3545); color: var(--brand-on-primary, #fff); padding: 12px 14px; display: flex;
    align-items: center; justify-content: space-between; flex-shrink: 0;
}
#csw-header button { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; opacity: .85; }
#csw-header button:hover { opacity: 1; }
#csw-messages { flex: 1 1 auto; overflow-y: auto; padding: 12px; background: #f8f9fa; }
.csw-msg { display: flex; margin-bottom: 10px; }
.csw-msg.csw-in { justify-content: flex-start; }
.csw-msg.csw-out { justify-content: flex-end; }
.csw-bubble-text {
    max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.35;
    white-space: pre-line; word-break: break-word;
}
.csw-in .csw-bubble-text { background: #fff; border: 1px solid #e2e2e2; border-bottom-left-radius: 3px; }
.csw-out .csw-bubble-text { background: var(--brand-primary, #dc3545); color: var(--brand-on-primary, #fff); border-bottom-right-radius: 3px; }
.csw-msg-label { font-size: 11px; opacity: .7; display: block; margin-bottom: 2px; }
#csw-quick-replies { padding: 0 10px; display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
#csw-quick-replies:not(:empty) { padding-top: 8px; padding-bottom: 4px; }
.csw-chip {
    border: 1px solid var(--brand-primary, #dc3545); color: var(--brand-primary, #dc3545); background: #fff; border-radius: 14px;
    padding: 4px 10px; font-size: 12.5px; cursor: pointer;
}
.csw-chip:hover { background: var(--brand-primary, #dc3545); color: var(--brand-on-primary, #fff); }
.csw-chip:disabled { opacity: .5; cursor: default; }
#csw-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #eee; flex-shrink: 0; }
#csw-input {
    flex: 1 1 auto; resize: none; border: 1px solid #ced4da; border-radius: 10px;
    padding: 8px 10px; font-size: 14px; max-height: 90px;
}
#csw-send {
    border: none; background: var(--brand-primary, #dc3545); color: var(--brand-on-primary, #fff); width: 40px; border-radius: 10px; flex-shrink: 0; cursor: pointer;
}
#csw-send:disabled { opacity: .6; cursor: default; }
#csw-error { padding: 0 10px 8px; }
@media (max-width: 420px) {
    #csw-panel { right: 10px; bottom: 82px; width: calc(100vw - 20px); }
    #csw-root { right: 10px; bottom: 10px; }
}
