.cc-root {
  --cc-paper: #f4f1ec;
  --cc-sand: #eae5dc;
  --cc-ink: #141414;
  --cc-ink-2: #3a372f;
  --cc-mute: #8a857a;
  --cc-accent: #e8472b;
  --cc-accent-dark: #c93a22;
  --cc-white: #ffffff;
  --cc-border: rgba(20, 20, 20, 0.1);
  --cc-shadow: 0 18px 50px rgba(15, 14, 12, 0.2);
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12000;
  font: 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--cc-ink);
}

.cc-launcher {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--cc-accent);
  color: var(--cc-white);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--cc-accent-shadow, rgba(232, 71, 43, 0.38));
}

.cc-launcher:hover,
.cc-launcher:focus-visible {
  background: var(--cc-accent-dark);
}

.cc-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  background: var(--cc-paper);
  border: 1px solid var(--cc-border);
  border-radius: 18px;
  box-shadow: var(--cc-shadow);
  overflow: hidden;
}

.cc-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--cc-white);
  border-bottom: 1px solid var(--cc-border);
}

.cc-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--cc-ink);
}

.cc-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--cc-mute);
}

.cc-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cc-notice {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--cc-mute);
  background: var(--cc-sand);
  border-bottom: 1px solid var(--cc-border);
}

.cc-notice-link {
  color: var(--cc-ink-2);
  text-decoration: underline;
}

.cc-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-message {
  max-width: 88%;
  padding: 9px 11px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

.cc-message-assistant {
  align-self: flex-start;
  background: var(--cc-white);
  border: 1px solid var(--cc-border);
  color: var(--cc-ink-2);
}

.cc-message-user {
  align-self: flex-end;
  background: var(--cc-ink);
  color: var(--cc-white);
}

.cc-starters {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}

.cc-panel-lead-open .cc-starters {
  display: none;
}

.cc-starter {
  border: 1px solid var(--cc-border);
  background: var(--cc-white);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--cc-ink-2);
  cursor: pointer;
}

.cc-starter:hover,
.cc-starter:focus-visible {
  border-color: var(--cc-accent);
  color: var(--cc-ink);
}

.cc-typing {
  flex: 0 0 auto;
  padding: 0 14px 6px;
  font-size: 11px;
  color: var(--cc-mute);
}

.cc-footer {
  flex: 0 0 auto;
  position: relative;
  background: var(--cc-white);
  border-top: 1px solid var(--cc-border);
}

.cc-lead-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  padding: 10px 12px 12px;
  background: var(--cc-white);
  border-top: 2px solid var(--cc-accent);
  box-shadow: 0 -8px 24px rgba(15, 14, 12, 0.08);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cc-lead-sheet.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cc-lead-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cc-lead-title {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
  color: var(--cc-ink);
}

.cc-lead-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--cc-mute);
  cursor: pointer;
  padding: 0 2px;
}

.cc-lead-grid {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 6px;
}

.cc-lead-form label {
  display: grid;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cc-mute);
}

.cc-lead-form input,
.cc-lead-form select {
  font: inherit;
  font-size: 13px;
  text-transform: none;
  font-weight: 400;
  padding: 7px 9px;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: var(--cc-paper);
  color: var(--cc-ink);
}

.cc-lead-form input:focus,
.cc-lead-form select:focus {
  outline: 2px solid rgba(232, 71, 43, 0.25);
  border-color: var(--cc-accent);
}

.cc-lead-contact {
  grid-column: 1 / -1;
}

.cc-lead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cc-consent {
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 6px !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--cc-mute) !important;
  line-height: 1.3;
}

.cc-consent input {
  margin-top: 2px;
  width: auto;
  padding: 0;
}

.cc-consent a {
  color: var(--cc-ink-2);
}

.cc-lead-submit {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--cc-accent);
  color: var(--cc-white);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.cc-lead-submit:hover,
.cc-lead-submit:focus-visible {
  background: var(--cc-accent-dark);
}

.cc-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px;
}

.cc-input {
  resize: none;
  min-height: 38px;
  max-height: 88px;
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: var(--cc-paper);
}

.cc-input:focus {
  outline: 2px solid rgba(232, 71, 43, 0.2);
  border-color: var(--cc-accent);
}

.cc-send {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--cc-ink);
  color: var(--cc-white);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.cc-send:hover,
.cc-send:focus-visible {
  background: var(--cc-ink-2);
}

.cc-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cc-fallback {
  padding: 0 12px 8px;
  font-size: 11px;
  text-align: center;
}

.cc-fallback-link {
  color: var(--cc-accent);
  font-weight: 600;
}

@media (max-width: 480px) {
  .cc-root {
    right: 12px;
    bottom: 12px;
  }

  .cc-panel {
    width: min(100vw - 16px, 380px);
    bottom: 54px;
    height: min(520px, calc(100vh - 80px));
  }

  .cc-lead-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cc-lead-submit {
    width: 100%;
  }
}
