.rdc-root {
  --rdc-black: #111111;
  --rdc-red: #e30613;
  --rdc-red-dark: #b80510;
  --rdc-bg: #f4f4f4;
  --rdc-muted: #666;
  --rdc-border: #ddd;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  box-sizing: border-box;
}
.rdc-root *,
.rdc-root *::before,
.rdc-root *::after {
  box-sizing: border-box;
}
.rdc-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 2147483000;
  width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%;
  background: var(--rdc-red); color: #fff; cursor: pointer;
  box-shadow: 0 10px 28px rgba(227,6,19,.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.rdc-btn::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--rdc-black); pointer-events: none;
}
.rdc-btn:hover {
  transform: scale(1.06);
  background: var(--rdc-red-dark);
  box-shadow: 0 12px 32px rgba(227,6,19,.45);
}
.rdc-btn:active { transform: scale(.96); }
.rdc-btn-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity .18s ease, transform .18s ease;
}
.rdc-btn-icon svg { width: 28px; height: 28px; display: block; }
.rdc-btn-close { opacity: 0; transform: rotate(-60deg) scale(.6); }
.rdc-btn.is-open .rdc-btn-chat { opacity: 0; transform: rotate(60deg) scale(.6); }
.rdc-btn.is-open .rdc-btn-close { opacity: 1; transform: none; }
.rdc-btn.is-open { background: var(--rdc-black); }
.rdc-panel {
  position: fixed; right: 18px; bottom: 86px; z-index: 2147483001;
  width: 380px; max-width: calc(100vw - 24px); height: min(560px, calc(100vh - 100px));
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.28); display: none; flex-direction: column;
  min-width: 0; border: 1px solid var(--rdc-black);
}
.rdc-panel.is-open { display: flex; }
.rdc-panel.is-lead .rdc-form,
.rdc-panel.is-lead .rdc-actions { display: none; }
.rdc-head {
  flex: 0 0 auto;
  background: var(--rdc-black); color: #fff; padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-bottom: 3px solid var(--rdc-red);
}
.rdc-head-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rdc-head strong { font-size: 13px; letter-spacing: .02em; }
.rdc-head-note { font-size: 11px; line-height: 1.3; font-weight: 400; opacity: .65; }
.rdc-head-note[hidden] { display: none; }
.rdc-head button {
  background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 16px; width: auto;
}
.rdc-head .rdc-end {
  font-size: 11px; opacity: .75; padding: 0 8px; letter-spacing: 0;
}
.rdc-head .rdc-end:hover { opacity: 1; }
.rdc-msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px; background: var(--rdc-bg); }
.rdc-msg { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.rdc-msg a { color: var(--rdc-red); font-weight: 700; text-decoration: none; }
.rdc-msg a.rdc-url { word-break: break-all; }
.rdc-msg a:hover { text-decoration: underline; }
.rdc-msg.user { background: #fff; margin-left: 28px; border: 1px solid var(--rdc-border); }
.rdc-msg.assistant, .rdc-msg.operator, .rdc-msg.system {
  background: #fff; margin-right: 28px; border-left: 3px solid var(--rdc-red);
}
.rdc-cards { display: grid; gap: 8px; margin: 8px 0 0; }
.rdc-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--rdc-border); border-radius: 10px;
  padding: 8px; color: inherit; text-decoration: none; overflow-wrap: anywhere;
}
.rdc-card:hover { border-color: var(--rdc-red); }
.rdc-card-media {
  flex: 0 0 72px; width: 72px; height: 54px; border-radius: 8px;
  background: #eee; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.rdc-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rdc-card-body { min-width: 0; flex: 1 1 auto; }
.rdc-card b { display: block; font-size: 13px; color: var(--rdc-black); }
.rdc-card-price { color: var(--rdc-muted); font-size: 12px; }
.rdc-more {
  display: block; padding: 4px 4px 2px; font-size: 13px; font-weight: 700;
  color: var(--rdc-red); text-align: center; text-decoration: none;
}
.rdc-more:hover { text-decoration: underline; }
.rdc-rate {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 10px 0 0;
  border-top: 1px solid var(--rdc-border);
  font-size: 12px; color: var(--rdc-muted);
}
.rdc-footer { flex: 0 0 auto; background: #fff; border-top: 1px solid var(--rdc-border); min-width: 0; overflow: hidden; }
.rdc-panel.is-lead .rdc-msgs { flex: 1 1 0; min-height: 0; }
.rdc-form { display: flex; gap: 8px; padding: 10px; align-items: flex-end; }
.rdc-form textarea {
  flex: 1 1 auto; width: auto; min-width: 0; resize: none; height: 44px;
  overflow-y: auto;
  border: 1px solid var(--rdc-border); border-radius: 8px; padding: 10px; font: inherit; font-size: 14px;
}
.rdc-form textarea:focus { border-color: var(--rdc-red); outline: none; }
.rdc-form > button {
  flex: 0 0 44px; width: 44px; height: 44px; background: var(--rdc-red); color: #fff;
  border: 0; border-radius: 8px; cursor: pointer; font-size: 16px;
}
.rdc-form > button:hover { background: var(--rdc-red-dark); }
.rdc-actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.rdc-actions button {
  width: 100%; background: var(--rdc-black); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 12px; cursor: pointer; font-size: 14px;
}
.rdc-actions button:hover { background: var(--rdc-red); }
.rdc-lead-form {
  display: none; flex-direction: column; gap: 8px; padding: 10px 12px 12px; min-width: 0;
}
.rdc-lead-form.is-open { display: flex; }
.rdc-lead-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px;
}
.rdc-lead-head strong { font-size: 14px; color: var(--rdc-black); }
.rdc-lead-cancel {
  flex: 0 0 auto; width: auto !important; margin: 0; padding: 6px 10px !important;
  border: 0; border-radius: 8px; background: #eee; color: #333; cursor: pointer; font-size: 13px;
}
.rdc-lead-form label {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #555; min-width: 0;
}
.rdc-lead-form input,
.rdc-lead-form textarea {
  display: block; width: 100%; max-width: 100%; min-width: 0;
  border: 1px solid var(--rdc-border); border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 16px; line-height: 1.3; background: #fff; color: var(--rdc-black);
}
.rdc-lead-form input:focus,
.rdc-lead-form textarea:focus { border-color: var(--rdc-red); outline: none; }
.rdc-lead-form textarea { height: 56px; resize: none; }
.rdc-lead-send {
  width: 100%; border: 0; border-radius: 8px; padding: 12px 8px;
  background: var(--rdc-red); color: #fff; cursor: pointer; font-size: 14px;
}
.rdc-lead-send:hover { background: var(--rdc-red-dark); }
.rdc-typing { font-size: 12px; color: var(--rdc-muted); padding: 0 12px 8px; display: none; flex: 0 0 auto; }
.rdc-turn { margin: 0 0 10px; }
.rdc-turn .rdc-msg { margin-bottom: 8px; }
.rdc-rate span { flex: 1 1 auto; min-width: 90px; }
.rdc-rate button {
  width: auto; min-width: 64px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--rdc-border); background: #fff; color: var(--rdc-black); font-size: 12px;
}
.rdc-rate button:hover { border-color: var(--rdc-red); color: var(--rdc-red); }
.rdc-rate button.is-on { background: var(--rdc-black); color: #fff; border-color: var(--rdc-black); }
.rdc-rate.is-done span { color: var(--rdc-black); }
