.sc-chat, .sc-float { --sc-accent: #2563eb; --sc-text: #1f2328; --sc-muted: #6b7280; --sc-border: #d9dce1; --sc-bot: #f2f4f7; box-sizing: border-box; font-family: inherit; color: var(--sc-text); }
.sc-chat *, .sc-float * { box-sizing: border-box; }
.sc-box { display: flex; flex-direction: column; min-height: 0; }

/* Messages */
.sc-messages { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px; }
.sc-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; word-wrap: break-word; }
.sc-msg a { color: inherit; text-decoration: underline; }
.sc-user { align-self: flex-end; background: var(--sc-accent); color: #fff; border-bottom-right-radius: 4px; }
.sc-bot { align-self: flex-start; background: var(--sc-bot); border-bottom-left-radius: 4px; }
.sc-typing { display: flex; gap: 4px; padding: 14px; }
.sc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--sc-muted); animation: sc-dot 1.2s infinite ease-in-out; }
.sc-typing span:nth-child(2) { animation-delay: .15s; }
.sc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* "Go to page" buttons under an answer */
.sc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sc-links a { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--sc-border); color: var(--sc-accent) !important; text-decoration: none !important; border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.sc-links a::after { content: "→"; }
.sc-links a:hover { border-color: var(--sc-accent); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* Input */
.sc-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 12px 12px 18px; }
.sc-input { flex: 1; border: 0 !important; outline: none; resize: none; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 16px; line-height: 1.4; padding: 8px 0 !important; margin: 0; min-height: 0; color: inherit; }
.sc-input::placeholder { color: var(--sc-muted); }
.sc-send { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--sc-accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .15s; }
.sc-send:hover { opacity: .88; }

/* Footer row: start over + branding */
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 10px; font-size: 12px; color: var(--sc-muted); min-height: 0; }
.sc-foot:empty { display: none; }
.sc-reset { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--sc-muted); cursor: pointer; text-decoration: underline; visibility: hidden; }
.sc-has-msgs .sc-reset { visibility: visible; }
.sc-powered { margin-left: auto; }
.sc-powered a { color: inherit; text-decoration: none; }

/* Contact card */
.sc-contact { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sc-contact p { margin: 0; font-size: 14px; }
.sc-contact input { width: 100%; border: 1px solid var(--sc-border); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 15px; background: #fff; color: var(--sc-text); }
.sc-contact-actions { display: flex; gap: 8px; }
.sc-contact button { border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; background: var(--sc-accent); color: #fff; }
.sc-contact .sc-skip { background: transparent; color: var(--sc-muted); }
.sc-err { color: #b42318; }

/* Suggested questions */
.sc-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-starters button { border: 1px solid var(--sc-border); color: var(--sc-text); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; transition: all .15s; }
.sc-starters button:hover { border-color: var(--sc-accent); color: var(--sc-accent); }

/* ---------- Inline (shortcode) ---------- */
.sc-inline { width: 100%; margin: 0 auto; }
.sc-inline .sc-box { border: 1px solid var(--sc-border); border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); overflow: hidden; }
.sc-inline .sc-messages { max-height: 440px; border-bottom: 1px solid var(--sc-border); }
.sc-inline:not(.sc-has-msgs) .sc-messages { display: none; }
.sc-inline .sc-form { padding: 14px 14px 14px 20px; min-height: 64px; }

/* Compact: [sparkchat size="compact"] */
.sc-size-compact { max-width: 760px; }

/* Hero: [sparkchat] — the main way to use the site */
.sc-size-hero { max-width: 860px; }
.sc-hero-head { text-align: center; margin: 0 0 20px; }
.sc-heading { font-size: clamp(26px, 4vw, 40px); line-height: 1.15; margin: 0 0 8px; font-weight: 700; }
.sc-sub { font-size: 17px; color: var(--sc-muted); margin: 0; }
.sc-size-hero .sc-box { border-radius: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.10); border-color: #e5e7eb; }
.sc-size-hero .sc-form { padding: 18px 16px 18px 26px; min-height: 84px; }
.sc-size-hero .sc-input { font-size: 19px; }
.sc-size-hero .sc-send { width: 48px; height: 48px; }
.sc-size-hero .sc-send svg { width: 22px; height: 22px; }
.sc-size-hero .sc-messages { padding: 22px 24px; gap: 14px; max-height: min(560px, 60vh); }
.sc-size-hero .sc-msg { font-size: 16px; line-height: 1.55; padding: 14px 18px; max-width: 90%; }
.sc-size-hero .sc-starters { justify-content: center; padding: 2px 0 4px; }
.sc-size-hero .sc-starters button { font-size: 15px; padding: 10px 16px; }
.sc-size-hero:not(.sc-has-msgs) .sc-messages { display: none; }
.sc-size-hero .sc-foot { padding: 0 20px 12px; }

/* ---------- Floating bubble ---------- */
.sc-float { position: fixed; bottom: 20px; z-index: 999999; display: flex; flex-direction: column; gap: 12px; }
.sc-float.sc-pos-right { right: 20px; align-items: flex-end; }
.sc-float.sc-pos-left { left: 20px; align-items: flex-start; }
.sc-launcher { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--sc-accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: transform .15s; padding: 0; }
.sc-launcher:hover { transform: scale(1.05); }
.sc-panel { width: 370px; height: 540px; max-height: calc(100vh - 110px); background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.2); display: flex; flex-direction: column; overflow: hidden; }
.sc-panel[hidden] { display: none; }
.sc-floating .sc-box { flex: 1; min-height: 0; }
.sc-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--sc-accent); color: #fff; font-weight: 600; font-size: 16px; }
.sc-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.sc-floating .sc-messages { flex: 1; }
.sc-floating .sc-form { border-top: 1px solid var(--sc-border); }
.sc-floating .sc-foot { justify-content: center; padding: 0 0 8px; }

@media (max-width: 600px) {
	.sc-float { bottom: 14px; }
	.sc-float.sc-pos-right { right: 14px; }
	.sc-float.sc-pos-left { left: 14px; }
	.sc-float.sc-open .sc-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
	.sc-float.sc-open .sc-launcher { display: none; }
	.sc-size-hero .sc-form { padding: 12px 12px 12px 18px; min-height: 68px; }
	.sc-size-hero .sc-input { font-size: 17px; }
}
