.rslc-root { --rslc-color: #2563eb; --rslc-on-color: #fff; font-family: inherit; font-size: 15px; line-height: 1.4; color: #111827; box-sizing: border-box; }
.rslc-root button, .rslc-root input, .rslc-root textarea { font-family: inherit; }
.rslc-hidden { display: none !important; }
.rslc-root *, .rslc-root *::before, .rslc-root *::after { box-sizing: border-box; }

.rslc-floating { position: fixed; right: 20px; bottom: 20px; z-index: 999999; }
.rslc-floating.rslc-left { right: auto; left: 20px; }

.rslc-button { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--rslc-color); color: var(--rslc-on-color); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); position: relative; padding: 0; }
.rslc-button:hover { filter: brightness(1.08); }
.rslc-badge { display: none; position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; align-items: center; justify-content: center; }

.rslc-panel { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.18); border: 1px solid #e5e7eb; }
.rslc-panel[hidden] { display: none; }
.rslc-floating .rslc-panel { position: absolute; bottom: 76px; right: 0; width: 360px; height: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px - var(--rslc-lift, 0px)); }
.rslc-floating.rslc-left .rslc-panel { right: auto; left: 0; }
.rslc-inline .rslc-panel { height: 100%; box-shadow: none; }

.rslc-head { background: var(--rslc-color); color: var(--rslc-on-color); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.rslc-title { font-weight: 600; flex: 1; }
.rslc-status { font-size: 12px; opacity: .85; }
.rslc-close { background: transparent; border: 0; color: var(--rslc-on-color); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px; }

.rslc-list { flex: 1; overflow-y: auto; padding: 12px; background: #f9fafb; display: flex; flex-direction: column; gap: 6px; }
.rslc-msg { display: flex; }
.rslc-me { justify-content: flex-end; }
.rslc-bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.rslc-them .rslc-bubble { background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.rslc-me .rslc-bubble { background: var(--rslc-color); color: var(--rslc-on-color); border-bottom-right-radius: 4px; }

.rslc-offline { padding: 10px 12px 0; background: #fff; border-top: 1px solid #e5e7eb; }
.rslc-offline p { margin: 0 0 8px; font-size: 13px; color: #4b5563; }
.rslc-offline input { width: 100%; margin: 0 0 6px; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; font-size: 14px; }

.rslc-form { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid #e5e7eb; }
.rslc-form textarea { flex: 1; resize: none; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px; font: inherit; min-height: 38px; max-height: 120px; }
.rslc-send { background: var(--rslc-color); color: var(--rslc-on-color); border: 0; border-radius: 8px; padding: 0 14px; cursor: pointer; font: inherit; font-weight: 600; }
.rslc-error { color: #b91c1c; font-size: 12px; padding: 0 12px; background: #fff; }
.rslc-error:empty { display: none; }

.rslc-text { white-space: pre-wrap; }
.rslc-image { display: block; margin: -2px -6px 6px; }
.rslc-image img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; }
.rslc-file { display: flex; align-items: center; gap: 8px; color: inherit !important; text-decoration: none !important; padding: 2px 0; }
.rslc-file + .rslc-text { margin-top: 6px; }
.rslc-file-icon { font-size: 20px; }
.rslc-file-meta { display: flex; flex-direction: column; min-width: 0; }
.rslc-file-meta strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.rslc-file-meta small { opacity: .75; font-size: 12px; }
