/* ClearComplaint Public Complaint Helper Modal v1.1 */
.cc-helper-launcher,
.cc-helper-nudge,
.cc-helper-panel,
.cc-helper-backdrop {
  --cc-helper-accent: var(--cc-purple, var(--accent, #6f32d6));
  --cc-helper-accent-dark: var(--cc-purple-dark, var(--accent2, #5522b4));
  --cc-helper-accent-soft: var(--cc-purple-soft, var(--accentSoft, #f2ecff));
  --cc-helper-accent-line: var(--cc-purple-line, #dac9ff);
  --cc-helper-ink: var(--cc-ink, var(--text, #111a35));
  --cc-helper-ink-soft: var(--cc-ink-soft, var(--muted2, #24304d));
  --cc-helper-muted: var(--cc-slate, var(--muted, #5f6b85));
  --cc-helper-line: var(--cc-border, var(--line, #dde3ef));
  --cc-helper-line-strong: var(--cc-border-strong, var(--lineStrong, #c9d2e4));
  --cc-helper-card: var(--cc-card, var(--panel, #ffffff));
  --cc-helper-soft: var(--cc-bg-soft, var(--panel3, #f3f5fa));
  --cc-helper-success: var(--success, #16745f);
  --cc-helper-warning: var(--warning, #8a5a00);
  --cc-helper-shadow: var(--shadowLift, 0 22px 56px rgba(17, 26, 53, 0.12));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cc-helper-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cc-helper-accent);
  border-radius: 14px;
  padding: 12px 16px 12px 12px;
  background: var(--cc-helper-accent);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(111, 50, 214, 0.22);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.cc-helper-launcher:hover {
  background: var(--cc-helper-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(111, 50, 214, 0.26);
}

.cc-helper-launcher__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 900;
}

.cc-helper-nudge {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 1055;
  width: min(340px, calc(100% - 44px));
  background: var(--cc-helper-card);
  border: 1px solid var(--cc-helper-line);
  border-radius: 22px;
  box-shadow: var(--cc-helper-shadow);
  padding: 15px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: 220ms ease;
}

.cc-helper-nudge.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cc-helper-nudge strong {
  display: block;
  margin-bottom: 4px;
  color: var(--cc-helper-ink);
  letter-spacing: -0.02em;
}

.cc-helper-nudge p {
  margin: 0 0 12px;
  color: var(--cc-helper-muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.cc-helper-nudge__actions {
  display: flex;
  gap: 8px;
}

.cc-helper-nudge__actions button {
  border: 1px solid var(--cc-helper-line-strong);
  background: #fff;
  color: var(--cc-helper-ink-soft);
  border-radius: 12px;
  padding: 9px 11px;
  font-weight: 780;
  cursor: pointer;
}

.cc-helper-nudge__actions .cc-helper-nudge__primary {
  background: var(--cc-helper-accent);
  color: #fff;
  border-color: var(--cc-helper-accent);
}

.cc-helper-nudge__actions .cc-helper-nudge__primary:hover {
  background: var(--cc-helper-accent-dark);
}

.cc-helper-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 26, 53, 0.38);
  z-index: 1070;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.cc-helper-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cc-helper-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1080;
  width: min(460px, calc(100% - 44px));
  max-height: min(760px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  background: var(--cc-helper-card);
  border: 1px solid rgba(221, 227, 239, 0.96);
  border-radius: 28px;
  box-shadow: var(--cc-helper-shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  pointer-events: none;
  transition: 220ms ease;
  color: var(--cc-helper-ink);
}

.cc-helper-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cc-helper-panel__header {
  padding: 18px 18px 15px;
  background: linear-gradient(135deg, #ffffff, var(--cc-helper-accent-soft));
  border-bottom: 1px solid var(--cc-helper-accent-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cc-helper-panel__titleWrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cc-helper-panel__avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #fff;
  border: 2px solid var(--cc-helper-accent);
  color: var(--cc-helper-accent);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(111, 50, 214, 0.12);
  flex: 0 0 auto;
}

.cc-helper-panel__avatar svg {
  width: 22px;
  height: 22px;
  display: block;
}

.cc-helper-panel__header h2 {
  font-size: 1.06rem;
  margin: 0 0 3px;
  letter-spacing: -0.035em;
  color: var(--cc-helper-ink);
}

.cc-helper-panel__header p {
  margin: 0;
  color: var(--cc-helper-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.cc-helper-panel__close {
  border: 1px solid var(--cc-helper-line);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fff;
  color: var(--cc-helper-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.cc-helper-panel__close:hover {
  border-color: var(--cc-helper-accent-line);
  color: var(--cc-helper-accent-dark);
}

.cc-helper-panel__body {
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.cc-helper-status {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--cc-helper-soft);
  border: 1px solid var(--cc-helper-line);
  border-radius: 16px;
  color: var(--cc-helper-ink-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cc-helper-status__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cc-helper-success);
  box-shadow: 0 0 0 5px rgba(22, 116, 95, 0.10);
  flex: 0 0 auto;
}

.cc-helper-card,
.cc-helper-answer {
  border: 1px solid var(--cc-helper-line);
  border-radius: 20px;
  padding: 14px;
  background: #fff;
}

.cc-helper-card--soft {
  background: linear-gradient(180deg, #fff, var(--cc-helper-accent-soft));
  border-color: var(--cc-helper-accent-line);
}

.cc-helper-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--cc-helper-ink);
}

.cc-helper-card p {
  margin: 0;
  color: var(--cc-helper-muted);
  line-height: 1.48;
  font-size: 0.92rem;
}

.cc-helper-quickGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.cc-helper-quickGrid button,
.cc-helper-chipRow button,
.cc-helper-result,
.cc-helper-secondary,
.cc-helper-tertiary {
  border: 1px solid var(--cc-helper-line);
  background: #fff;
  color: var(--cc-helper-ink);
  cursor: pointer;
}

.cc-helper-quickGrid button {
  border-radius: 15px;
  padding: 12px;
  text-align: left;
  font-weight: 780;
  line-height: 1.24;
  min-height: 70px;
}

.cc-helper-quickGrid small {
  display: block;
  color: var(--cc-helper-muted);
  font-weight: 600;
  margin-top: 4px;
}

.cc-helper-quickGrid button:hover,
.cc-helper-chipRow button:hover,
.cc-helper-result:hover,
.cc-helper-secondary:hover,
.cc-helper-tertiary:hover {
  border-color: var(--cc-helper-accent-line);
  box-shadow: 0 10px 24px rgba(17, 26, 53, 0.08);
}

.cc-helper-label {
  display: block;
  font-size: 0.84rem;
  color: var(--cc-helper-ink-soft);
  font-weight: 780;
  margin-bottom: 7px;
}

.cc-helper-inputRow {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cc-helper-input {
  flex: 1;
  width: 100%;
  border: 1px solid var(--cc-helper-line-strong);
  border-radius: 15px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  color: var(--cc-helper-ink);
  background: #fff;
}

.cc-helper-input:focus {
  border-color: var(--cc-helper-accent);
  box-shadow: 0 0 0 4px rgba(111, 50, 214, 0.10);
}

.cc-helper-send {
  border: 0;
  border-radius: 15px;
  background: var(--cc-helper-accent);
  color: #fff;
  width: 45px;
  height: 45px;
  font-size: 1.1rem;
  cursor: pointer;
}

.cc-helper-send:hover {
  background: var(--cc-helper-accent-dark);
}

.cc-helper-chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.cc-helper-chipRow button {
  border-radius: 999px;
  padding: 8px 11px;
  font-weight: 720;
  font-size: 0.86rem;
}

.cc-helper-chipRow button.is-active {
  background: var(--cc-helper-accent-soft);
  border-color: var(--cc-helper-accent-line);
  color: var(--cc-helper-accent-dark);
}

.cc-helper-results {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.cc-helper-result {
  width: 100%;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 3px;
  text-decoration: none;
}

.cc-helper-result strong {
  font-size: 0.94rem;
}

.cc-helper-result span {
  color: var(--cc-helper-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.cc-helper-answer {
  border-color: var(--cc-helper-accent-line);
  background: linear-gradient(180deg, #ffffff, #fbf8ff);
}

.cc-helper-answer__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.cc-helper-answer__topline strong {
  letter-spacing: -0.02em;
}

.cc-helper-answer__topline span {
  font-size: 0.75rem;
  font-weight: 850;
  color: var(--cc-helper-accent-dark);
  background: var(--cc-helper-accent-soft);
  border: 1px solid var(--cc-helper-accent-line);
  border-radius: 999px;
  padding: 5px 8px;
  white-space: nowrap;
}

.cc-helper-answer p {
  color: var(--cc-helper-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.cc-helper-answer ul {
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.cc-helper-answer li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--cc-helper-ink-soft);
  font-size: 0.88rem;
}

.cc-helper-answer li::before {
  content: "✓";
  color: var(--cc-helper-success);
  font-weight: 900;
}

.cc-helper-ctaStack {
  display: grid;
  gap: 8px;
}

.cc-helper-primary,
.cc-helper-secondary,
.cc-helper-tertiary {
  border-radius: 15px;
  padding: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.cc-helper-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--cc-helper-accent);
  color: #fff;
  box-shadow: 0 13px 30px rgba(111, 50, 214, 0.22);
}

.cc-helper-primary:hover {
  background: var(--cc-helper-accent-dark);
}

.cc-helper-secondary,
.cc-helper-tertiary {
  background: #fff;
  color: var(--cc-helper-ink);
}

.cc-helper-guardrail {
  border-radius: 15px;
  background: #fffaf0;
  color: #6d4a12;
  border: 1px solid #f3d896;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.42;
  margin-top: 11px;
}

.cc-helper-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cc-helper-muted);
  font-size: 0.88rem;
  margin-top: 12px;
}

.cc-helper-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cc-helper-accent);
  animation: ccHelperBounce 900ms infinite alternate;
}

.cc-helper-typing span:nth-child(2) { animation-delay: 120ms; }
.cc-helper-typing span:nth-child(3) { animation-delay: 240ms; }

@keyframes ccHelperBounce {
  from { transform: translateY(0); opacity: 0.45; }
  to { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 760px) {
  .cc-helper-panel {
    inset: auto 0 0 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 28px 28px 0 0;
  }

  .cc-helper-launcher {
    right: 16px;
    bottom: 16px;
  }

  .cc-helper-nudge {
    right: 16px;
    bottom: 82px;
  }
}
