/* AnomicFlip — help & support widget (public/support.js). White panel, like a classic help messenger. */
.sp-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 54px; height: 54px; border: 1px solid #2e3238; border-radius: 16px;
  background: #24272c; color: #c9ccd1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: background .15s, color .15s, transform .15s;
}
.sp-btn:hover { background: #2c3036; color: #fff; transform: translateY(-1px); }
.sp-btn.on { background: #3fd68f; color: #0d1f16; border-color: #3fd68f; }
.sp-btn:focus-visible { outline: 2px solid #3fd68f; outline-offset: 3px; }
.sp-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #ff4d5e; color: #fff; font: 800 12px 'Archivo', system-ui, sans-serif; display: grid; place-items: center; border: 2px solid #121417; }
.sp-badge[hidden] { display: none; }

.sp {
  position: fixed; right: 20px; bottom: 86px; z-index: 900; width: 400px; height: min(700px, calc(100vh - 130px));
  background: #fff; color: #1a1d20; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0,0,0,.55); font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  animation: sp-in .18s ease-out; transform-origin: bottom right;
}
.sp[hidden] { display: none; }
@keyframes sp-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.sp *, .sp *::before { box-sizing: border-box; }
.sp button { font-family: inherit; }
.sp-view { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.sp.dark-top .sp-view { background: linear-gradient(180deg, #14171a 0, #1b2a22 230px, #f3f4f6 330px, #fff 440px); }

/* header bars */
.sp-bar { flex: none; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 12px; border-bottom: 1px solid #eceef1; background: #fff; position: sticky; top: 0; z-index: 2; }
.sp-bar > b { flex: 1; text-align: center; font-size: 19px; font-weight: 700; }
.sp-bar.convo > b { text-align: left; font-size: 17px; }
.sp-ic { flex: none; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: #4b5058; cursor: pointer; display: grid; place-items: center; }
button.sp-ic:hover { background: #f1f2f4; color: #111; }
.sp-who { cursor: pointer; }

/* avatars */
.sp-av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #e7e9ec center / cover no-repeat; display: grid; place-items: center; font-weight: 800; color: #1f8a5b; font-size: 15px; }
.sp-av.sm { width: 28px; height: 28px; font-size: 12px; }
.sp-av.ghost { visibility: hidden; }
.sp-stack { display: inline-flex; }
.sp-stack .sp-av { width: 44px; height: 44px; border: 3px solid #fff; margin-left: -12px; background-color: #2a2e34; }
.sp-stack .sp-av:first-child { margin-left: 0; }
.sp-stack.sm .sp-av { width: 34px; height: 34px; border-width: 2px; margin-left: -10px; }
.sp-stack.sm .sp-av:first-child { margin-left: 0; }
.sp-bar .sp-stack .sp-av { width: 32px; height: 32px; border-width: 2px; margin-left: -9px; }
.sp-bar .sp-stack .sp-av:first-child { margin-left: 0; }

/* home */
.sp-hero { padding: 26px 26px 18px; color: #fff; }
.sp-hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 64px; }
.sp-logo { width: 150px; height: 27px; background: url('/logo.png') left center / contain no-repeat; image-rendering: pixelated; margin-right: auto; }
.sp-hero .sp-stack .sp-av { border-color: #1a1d20; }
.sp-hero .sp-x { color: #fff; }
.sp-hero .sp-x:hover { background: rgba(255,255,255,.12); color: #fff; }
.sp-hero h2 { margin: 0; font-size: 30px; line-height: 1.22; font-weight: 700; letter-spacing: -.3px; }
.sp-home { display: grid; gap: 14px; padding: 6px 18px 20px; }
.sp-card { display: block; width: 100%; text-align: left; border: 0; border-radius: 14px; background: #fff; color: inherit; box-shadow: 0 2px 10px rgba(16,24,40,.12), 0 0 0 1px rgba(16,24,40,.06); }
.sp-send { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; cursor: pointer; font-size: 17px; }
.sp-send b { font-weight: 600; }
.sp-send svg { color: #1a1d20; }
.sp-send:hover, .sp-recent:hover { box-shadow: 0 4px 16px rgba(16,24,40,.16), 0 0 0 1px rgba(16,24,40,.08); }
.sp-recent { padding: 14px 18px; cursor: pointer; }
.sp-recent small { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.sp-row { display: flex; align-items: center; gap: 12px; }
.sp-rt { flex: 1; min-width: 0; display: grid; gap: 3px; text-align: left; }
.sp-rt b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-rt b.unread { font-weight: 800; }
.sp-rt span { font-size: 13.5px; color: #737880; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-search { padding: 10px; }
.sp-sbox { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 10px; background: #f3f4f6; color: #1a1d20; cursor: text; }
.sp-sbox input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 600 16px 'Archivo', system-ui, sans-serif; color: #1a1d20; }
.sp-sbox input::placeholder { color: #2c3036; }
.sp-sbox:focus-within { box-shadow: 0 0 0 2px #3fd68f inset; }
.sp-art { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; border: 0; border-radius: 8px; background: none; color: #6b7078; cursor: pointer; font-size: 16px; text-align: left; }
.sp-art svg { color: #1a1d20; flex: none; }
.sp-art:hover { background: #f5f6f8; color: #1a1d20; }

/* messages list */
.sp-list { flex: 1; padding: 6px 0; }
.sp-thread { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 20px; border: 0; border-bottom: 1px solid #f0f1f3; background: none; cursor: pointer; color: inherit; }
.sp-thread:hover { background: #f7f8f9; }
.sp-thread svg { flex: none; color: #9a9ea6; }
.sp-when { flex: none; font-size: 13px; color: #9a9ea6; }
.sp-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff4d5e; }
.sp-dot.n { width: auto; height: 20px; min-width: 20px; padding: 0 6px; border-radius: 99px; color: #fff; font: 800 12px/20px 'Archivo', system-ui, sans-serif; font-style: normal; text-align: center; }
.sp-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; color: #1a1d20; }
.sp-empty svg { color: #1a1d20; }
.sp-empty b { font-size: 22px; font-weight: 600; }
.sp-empty span { font-size: 16px; color: #2c3036; }
.sp-foot { flex: none; position: sticky; bottom: 0; display: flex; justify-content: center; padding: 18px; background: linear-gradient(transparent, #fff 40%); }
.sp-cta { display: inline-flex; align-items: center; gap: 12px; padding: 13px 24px; border: 0; border-radius: 10px; background: #1a1d20; color: #fff; cursor: pointer; font-size: 17px; font-weight: 600; }
.sp-cta:hover { background: #2a2e34; }
.sp-cta svg { color: #3fd68f; }

/* help */
.sp-help { padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.sp-arts { display: grid; }
.sp-none { padding: 20px 16px; color: #6b7078; text-align: center; }
.sp-link { border: 0; background: none; color: #1f8a5b; font-weight: 700; cursor: pointer; padding: 0; font-size: inherit; }
.sp-article { padding: 8px 26px 26px; font-size: 16px; line-height: 1.55; color: #2c3036; }
.sp-article h3 { margin: 6px 0 14px; font-size: 24px; color: #1a1d20; }
.sp-article a { color: #1f8a5b; font-weight: 700; }
.sp-still { margin-top: 26px; padding-top: 20px; border-top: 1px solid #eceef1; display: grid; justify-items: center; gap: 12px; color: #6b7078; }

/* conversation */
.sp.chat-mode .sp-view { overflow: hidden; }
.sp-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
.sp-intro { margin: auto; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 20px; color: #6b7078; }
.sp-intro .sp-stack { margin-bottom: 6px; }
.sp-intro b { color: #1a1d20; font-size: 19px; }
.sp-day { align-self: center; margin: 10px 0 6px; font-size: 12.5px; color: #9a9ea6; font-weight: 600; }
.sp-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.sp-msg > div { display: grid; min-width: 0; }
.sp-msg.me { align-self: flex-end; }
.sp-msg.me > div { justify-items: end; }
.sp-msg.end { margin-bottom: 8px; }
.sp-msg.end .sp-av { margin-bottom: 20px; }
.sp-b { padding: 11px 15px; border-radius: 18px; font-size: 15.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: normal; }
.sp-msg.them .sp-b { background: #f1f2f4; color: #1a1d20; border-bottom-left-radius: 6px; }
.sp-msg.me .sp-b { background: #1a1d20; color: #fff; border-bottom-right-radius: 6px; }
.sp-msg small { margin-top: 4px; font-size: 12px; color: #9a9ea6; }
.sp-comp { flex: none; position: relative; margin: 10px 12px 12px; padding: 12px 56px 12px 16px; border: 2px solid #1a1d20; border-radius: 22px; background: #fff; }
.sp-comp textarea { display: block; width: 100%; border: 0; outline: none; resize: none; font: 500 16px/1.4 'Archivo', system-ui, sans-serif; color: #1a1d20; max-height: 120px; background: none; }
.sp-comp textarea::placeholder { color: #9a9ea6; }
.sp-go { position: absolute; right: 10px; bottom: 9px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #1a1d20; color: #fff; cursor: pointer; display: grid; place-items: center; }
.sp-go:disabled { background: #e7e9ec; color: #fff; cursor: default; }
.sp-err { font-size: 13px; color: #d33a4a; }
.sp-err:empty { display: none; }

/* bottom tabs */
.sp-tabs { flex: none; display: flex; border-top: 1px solid #eceef1; background: #fff; }
.sp-tabs[hidden] { display: none; }
.sp-tabs button { position: relative; flex: 1; display: grid; justify-items: center; gap: 4px; padding: 12px 0 14px; border: 0; background: none; color: #6b7078; cursor: pointer; font-size: 15px; }
.sp-tabs button.on { color: #1a1d20; font-weight: 700; }
.sp-tabs button:hover { color: #1a1d20; }
.sp-tabs i { position: absolute; top: 10px; left: calc(50% + 10px); width: 10px; height: 10px; border-radius: 50%; background: #ff4d5e; border: 2px solid #fff; }
.sp-tabs i[hidden] { display: none; }

@media (max-width: 600px) {
  .sp-btn { right: 14px; bottom: 14px; width: 52px; height: 52px; border-radius: 14px; }
  .sp { right: 0; left: 0; bottom: 0; top: 0; width: auto; height: auto; border-radius: 0; z-index: 1001; }
  .sp-btn.on { z-index: 1002; display: none; }
}
@media (prefers-reduced-motion: reduce) { .sp, .sp-btn { animation: none; transition: none; } }

/* leave room at the bottom of every page so the help button never covers the last row */
body { padding-bottom: 84px; }

/* closed conversations, system lines, staff close button */
.sp-sys { align-self: center; margin: 8px 0; padding: 5px 12px; border-radius: 99px; background: #f1f2f4; color: #6b7078; font-size: 12.5px; font-weight: 600; text-align: center; }
.sp-closed { flex: none; margin: 0 12px; padding: 10px 14px; border-radius: 10px; background: #f6f7f8; color: #6b7078; font-size: 13.5px; text-align: center; }
.sp-close-t { flex: none; height: 32px; padding: 0 12px; border: 1px solid #d9dce0; border-radius: 8px; background: #fff; color: #1a1d20; cursor: pointer; font-weight: 700; font-size: 13.5px; }
.sp-close-t:hover { background: #f1f2f4; }
.sp-close-t.reopen { background: #1a1d20; color: #fff; border-color: #1a1d20; }
.sp-thread.closed { opacity: .6; }
.sp-tag { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: #eceef1; color: #6b7078; vertical-align: 1px; }

/* banned bar */
.sp-banbar { position: fixed; left: 50%; top: 100px; transform: translateX(-50%); z-index: 950; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: #2a1316; border: 1px solid #ff5c6c; color: #ffd2d7; font: 500 15px 'Archivo', system-ui, sans-serif; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.sp-banbar[hidden] { display: none; }
.sp-banbar b { color: #fff; }
.sp-banbar button { border: 0; border-radius: 8px; padding: 8px 12px; background: #ff5c6c; color: #2a0d11; font: 800 14px 'Archivo', system-ui, sans-serif; cursor: pointer; }
