:root {
  --shc-ink: #17332e;
  --shc-green: #0f766e;
  --shc-green-dark: #0b5e58;
  --shc-mint: #e9f7f3;
  --shc-cream: #fffaf0;
  --shc-coral: #e76443;
  --shc-line: #d7e4df;
}

body.shc-open { overflow: hidden; }

.shc-launcher {
  align-items: center;
  background: linear-gradient(135deg, var(--shc-green), var(--shc-green-dark));
  border: 0;
  border-radius: 999px;
  bottom: 20px;
  box-shadow: 0 12px 34px rgba(15, 72, 66, .28);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  gap: 8px;
  line-height: 1;
  min-height: 54px;
  padding: 0 20px;
  position: fixed;
  right: 20px;
  z-index: 99990;
}

.shc-launcher span:first-child {
  align-items: center;
  background: rgba(255,255,255,.16);
  border-radius: 50%;
  display: flex;
  font-size: 21px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.shc-launcher:hover,
.shc-launcher:focus-visible { background: #094f4a; transform: translateY(-1px); }

.shc-backdrop {
  background: rgba(9, 33, 29, .48);
  inset: 0;
  position: fixed;
  z-index: 99991;
}

.shc-panel {
  background: #fff;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 24px;
  bottom: 18px;
  box-shadow: 0 24px 80px rgba(8, 44, 39, .3);
  color: var(--shc-ink);
  display: grid;
  grid-template-rows: auto 4px minmax(160px, 1fr) auto auto;
  height: min(760px, calc(100vh - 36px));
  max-width: calc(100vw - 32px);
  overflow: hidden;
  position: fixed;
  right: 18px;
  width: 430px;
  z-index: 99992;
}

.shc-panel[hidden], .shc-backdrop[hidden] { display: none !important; }

.shc-panel__header {
  align-items: center;
  background: linear-gradient(135deg, #0d6d65, #104b47);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 18px 20px 16px;
}

.shc-panel__header h2 { color: #fff; font-size: 20px; line-height: 1.25; margin: 2px 0 0; }
.shc-eyebrow { color: #c9f6e8; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.shc-close { background: rgba(255,255,255,.12); border: 0; border-radius: 50%; color: #fff; cursor: pointer; font-size: 26px; height: 40px; line-height: 1; width: 40px; }
.shc-close:hover, .shc-close:focus-visible { background: rgba(255,255,255,.22); }
.shc-progress { background: #dcebe6; overflow: hidden; }
.shc-progress span { background: #f0a741; display: block; height: 100%; transition: width .3s ease; width: 8%; }

.shc-messages {
  background: linear-gradient(#f8fcfa, #fff);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px;
}

.shc-message {
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.7;
  max-width: 88%;
  padding: 11px 13px;
  white-space: pre-wrap;
}

.shc-message--assistant,
.shc-message--question { align-self: flex-start; background: #fff; border: 1px solid var(--shc-line); border-bottom-left-radius: 4px; }
.shc-message--question { box-shadow: 0 4px 12px rgba(15, 72, 66, .06); font-weight: 700; }
.shc-message--user { align-self: flex-end; background: var(--shc-green); border-bottom-right-radius: 4px; color: #fff; }
.shc-message--system { align-self: center; background: #eef3f1; color: #52615e; font-size: 12px; max-width: 100%; }
.shc-message--alert { align-self: stretch; background: #fff3ed; border: 1px solid #f0b39f; color: #8a2e16; font-weight: 700; max-width: 100%; }

.shc-form { border-top: 1px solid var(--shc-line); padding: 12px 14px 10px; }
.shc-consent { background: var(--shc-cream); border: 1px solid #ead9ae; border-radius: 12px; margin-bottom: 10px; padding: 12px; }
.shc-consent p { font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.shc-consent label { align-items: flex-start; cursor: pointer; display: flex; font-size: 12px; gap: 7px; line-height: 1.55; }
.shc-consent input { flex: 0 0 auto; margin-top: 3px; }
.shc-consent small { color: #6b5a35; display: block; font-size: 10px; line-height: 1.5; margin-top: 6px; }
.shc-input-label { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.shc-input-row { align-items: stretch; display: flex; gap: 8px; }
.shc-input-row textarea { border: 1px solid #b9cac4; border-radius: 12px; box-sizing: border-box; color: var(--shc-ink); flex: 1; font: inherit; font-size: 14px; line-height: 1.5; margin: 0; max-height: 130px; min-height: 52px; padding: 10px 11px; resize: vertical; }
.shc-input-row textarea:focus { border-color: var(--shc-green); box-shadow: 0 0 0 3px rgba(15,118,110,.12); outline: none; }
.shc-input-row button { background: var(--shc-coral); border: 0; border-radius: 12px; color: #fff; cursor: pointer; flex: 0 0 64px; font-size: 14px; font-weight: 800; }
.shc-input-row button:disabled { cursor: wait; opacity: .62; }
.shc-status { color: #667772; font-size: 10px; margin: 6px 2px 0; min-height: 1.4em; }
.shc-status.is-error { color: #b42318; font-size: 12px; font-weight: 700; }
.shc-honeypot { left: -9999px !important; opacity: 0 !important; position: absolute !important; }

.shc-quick { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.shc-quick:empty { display: none; }
.shc-quick__button { background: #fff; border: 1px solid var(--shc-green); border-radius: 999px; color: var(--shc-green-dark); cursor: pointer; font-size: 12px; font-weight: 700; padding: 8px 11px; }
.shc-quick__button:hover, .shc-quick__button:focus-visible { background: var(--shc-mint); }

.shc-result { align-self: stretch; background: var(--shc-cream); border: 1px solid #ead9ae; border-radius: 16px; padding: 15px; }
.shc-result > strong { display: block; font-size: 15px; margin-bottom: 8px; }
.shc-result p { font-size: 12px; font-weight: 800; margin: 8px 0 3px; }
.shc-result ul { font-size: 12px; line-height: 1.55; margin: 0 0 10px 18px; padding: 0; }
.shc-record-option { align-items: flex-start; display: flex; font-size: 11px; gap: 5px; line-height: 1.45; margin: 10px 0; }
.shc-result__actions { display: grid; gap: 7px; }
.shc-primary-action, .shc-secondary-action { border-radius: 10px; box-sizing: border-box; display: block; font-size: 13px; font-weight: 800; padding: 10px 12px; text-align: center; text-decoration: none; width: 100%; }
.shc-primary-action { background: var(--shc-coral); color: #fff !important; }
.shc-secondary-action { background: #fff; border: 1px solid var(--shc-green); color: var(--shc-green-dark); cursor: pointer; }
.shc-panel__footer { background: #f6f8f7; color: #667772; font-size: 10px; line-height: 1.45; padding: 8px 14px 10px; text-align: center; }

.shc-inline-entry {
  background: linear-gradient(135deg, #e8f7f2, #fff9e9);
  border: 1px solid #cfe4dc;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15,72,66,.08);
  color: var(--shc-ink);
  margin: 22px auto;
  max-width: 760px;
  padding: 24px;
  text-align: center;
}
.shc-inline-entry > span { color: var(--shc-green); display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.shc-inline-entry > strong { display: block; font-size: clamp(20px, 4vw, 30px); line-height: 1.35; margin: 7px 0; }
.shc-handoff-notice { background: #edf8f4; border: 1px solid #b9d9cd; border-radius: 12px; color: #123f37; font-weight: 700; margin: 0 0 20px; padding: 13px 15px; }
.shc-inline-entry p { font-size: 14px; margin: 0 auto 15px; max-width: 580px; }
.shc-inline-entry button { background: var(--shc-coral); border: 0; border-radius: 12px; box-shadow: 0 7px 18px rgba(170,58,31,.2); color: #fff; cursor: pointer; font-size: 15px; font-weight: 800; min-height: 50px; padding: 12px 20px; }

@media (max-width: 600px) {
  .shc-launcher { bottom: calc(12px + env(safe-area-inset-bottom)); font-size: 13px; min-height: 48px; padding: 0 14px; right: 12px; }
  .shc-launcher span:first-child { font-size: 18px; height: 29px; width: 29px; }
  .shc-panel { border-radius: 18px 18px 0 0; bottom: 0; height: min(820px, 94dvh); left: 0; max-width: none; right: 0; width: 100%; }
  .shc-panel__header { padding: 14px 16px 12px; }
  .shc-panel__header h2 { font-size: 18px; }
  .shc-messages { padding: 14px; }
  .shc-message { font-size: 13px; max-width: 91%; }
  .shc-form { padding: 10px 10px calc(9px + env(safe-area-inset-bottom)); }
  .shc-consent { padding: 10px; }
  .shc-input-row textarea { font-size: 16px; }
  .shc-inline-entry { border-radius: 16px; margin: 16px 12px; padding: 19px 15px; }
  .shc-inline-entry button { font-size: 14px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .shc-progress span, .shc-launcher { transition: none; }
}
