/* Kiko on the website (go-live items 8 and 9). Uses the site's tokens from site.css. */

.kk-fab {
  position: fixed; right: 20px; bottom: 22px; z-index: 55;
  display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 999px;
  background: var(--red, #d32b25); color: #fff; cursor: pointer;
  font: 800 14.5px/1 Manrope, ui-sans-serif, system-ui, sans-serif;
  box-shadow: var(--shadow-red, 0 8px 22px rgba(211, 43, 37, .22)), 0 2px 6px rgba(22, 24, 29, .12);
  transition: transform .15s ease, background .15s ease;
}
.kk-fab:hover { background: var(--red-deep, #a51f1a); transform: translateY(-1px); }
.kk-fab:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.kk-open .kk-fab { display: none; }

.kk-panel {
  position: fixed; right: 20px; bottom: 22px; z-index: 58;
  width: 380px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 44px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white, #fff); border: 1px solid var(--border, #eceae6); border-radius: 18px;
  box-shadow: 0 18px 48px rgba(22, 24, 29, .18);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif; color: var(--ink, #16181d);
}
.kk-panel[hidden] { display: none !important; }

.kk-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--red, #d32b25); color: #fff; }
.kk-ava { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16); flex: none; }
.kk-who { display: grid; gap: 1px; flex: 1; min-width: 0; }
.kk-who strong { font-size: 16px; font-weight: 800; }
.kk-who small { font-size: 12px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-new, .kk-close { border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; border-radius: 9px; font: inherit; }
.kk-new { font-size: 12px; font-weight: 700; padding: 7px 9px; }
.kk-close { width: 34px; height: 34px; font-size: 22px; line-height: 1; }
.kk-new:hover, .kk-close:hover { background: rgba(255, 255, 255, .24); }

.kk-thread { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; background: var(--ground, #fdfcfb); overscroll-behavior: contain; }
.kk-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.kk-msg p { margin: 0 0 7px; } .kk-msg p:last-child { margin-bottom: 0; }
.kk-msg a { color: inherit; }
.kk-bot { align-self: flex-start; background: var(--white, #fff); border: 1px solid var(--border, #eceae6); border-bottom-left-radius: 5px; }
.kk-me { align-self: flex-end; background: var(--ink, #16181d); color: #fff; border-bottom-right-radius: 5px; }
.kk-safety { background: var(--red-tint, #fff5f3); border-color: var(--red-border, #f7d9d4); }
.kk-error, .kk-limited, .kk-off { color: var(--body, #565961); background: var(--fill, #f4f3f0); border-color: transparent; }

.kk-cards { display: grid; gap: 6px; margin-top: 9px; }
.kk-card {
  position: relative; display: block; padding: 9px 30px 9px 11px; border-radius: 11px;
  border: 1px solid var(--border-2, #e6e4e0); background: var(--tint, #f8f7f4);
  color: var(--ink, #16181d) !important; text-decoration: none; font-weight: 700; font-size: 13.5px; line-height: 1.35;
}
.kk-card span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red, #d32b25); margin-bottom: 2px; }
.kk-card i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 20px; color: var(--muted, #8a8d94); }
.kk-card:hover { border-color: var(--red-border-2, #f0cfc9); background: var(--red-tint-2, #fffaf9); }

.kk-wait { display: inline-flex; gap: 4px; padding: 13px 14px; }
.kk-wait span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #8a8d94); animation: kk-dot 1.1s infinite ease-in-out; }
.kk-wait span:nth-child(2) { animation-delay: .15s; } .kk-wait span:nth-child(3) { animation-delay: .3s; }
@keyframes kk-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .kk-wait span { animation: none; } .kk-fab { transition: none; } }

.kk-topics { display: flex; gap: 6px; overflow-x: auto; padding: 9px 12px 2px; border-top: 1px solid var(--border, #eceae6); scrollbar-width: none; }
.kk-topics::-webkit-scrollbar { display: none; }
.kk-topic {
  flex: none; border: 1px solid var(--border-4, #d9d7d2); background: var(--white, #fff); color: var(--ink, #16181d);
  border-radius: 999px; padding: 7px 12px; font: 700 13px/1.2 Manrope, ui-sans-serif, system-ui, sans-serif; cursor: pointer; white-space: nowrap;
}
.kk-topic.is-hl { border-color: var(--red, #d32b25); color: var(--red, #d32b25); background: var(--red-tint, #fff5f3); }
.kk-topic:hover { border-color: var(--red, #d32b25); }

.kk-form { display: flex; gap: 8px; padding: 10px 12px 4px; }
.kk-form input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border-4, #d9d7d2); background: var(--white, #fff);
  font: 500 15px Manrope, ui-sans-serif, system-ui, sans-serif; color: var(--ink, #16181d);
}
.kk-form input:focus { outline: none; border-color: var(--red, #d32b25); box-shadow: 0 0 0 3px var(--red-tint, #fff5f3); }
.kk-form button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--red, #d32b25); color: #fff; cursor: pointer; display: grid; place-items: center; }
.kk-form button:disabled { opacity: .5; cursor: wait; }
.kk-note { margin: 0; padding: 4px 14px 10px; font-size: 11px; color: var(--muted, #8a8d94); }

/* Phones: above the bottom tab bar; the panel takes the whole screen. */
@media (max-width: 900px) {
  .kk-fab { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); height: 48px; padding: 0 15px 0 12px; font-size: 14px; }
}
@media (max-width: 560px) {
  .kk-fab span { display: none; }
  .kk-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .kk-panel { inset: 0; width: auto; max-width: none; height: auto; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .kk-open, .kk-open body { overflow: hidden; }
  .kk-msg { font-size: 15px; }
}

/* Talk to a person (go-live item 26): the chat becomes a help ticket. */
.kk-human { border: 0; background: none; padding: 0; margin-left: 2px; font: inherit; font-size: 11px; font-weight: 700; color: var(--red, #d32b25); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.kk-human[hidden] { display: none; }
.kk-hand { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 14px; background: var(--ground, #fdfcfb); }
.kk-hand[hidden] { display: none; }
.kk-hand-lead { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--body, #565961); }
.kk-hand label { display: grid; gap: 6px; font: 500 13px/1.3 Manrope, Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink, #16181d); }
.kk-hand label span { font-weight: 400; color: var(--muted, #8a8d94); }
.kk-hand input, .kk-hand select, .kk-hand textarea {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border-4, #d9d7d2); background: var(--white, #fff); color: var(--ink, #16181d);
  font: 400 14.5px/1.4 Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
}
.kk-hand textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.kk-hand select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--white, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%23565961' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 10px center; }
.kk-hand input:focus, .kk-hand select:focus, .kk-hand textarea:focus { outline: none; border-color: var(--red, #d32b25); box-shadow: 0 0 0 3px var(--red-tint, #fff5f3); }
.kk-hand-guest { display: grid; gap: 12px; }
.kk-hand-guest[hidden] { display: none; }
.kk-hand-err { margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--red-tint, #fff5f3); color: var(--red-deep, #a51f1a); font-size: 13px; }
.kk-hand-err[hidden] { display: none; }
.kk-hand-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kk-hand-send, .kk-hand-back { height: 44px; padding: 0 16px; border-radius: 12px; font: 700 14px/1 Manrope, Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.kk-hand-send { border: 0; background: var(--red, #d32b25); color: #fff; }
.kk-hand-send:disabled { opacity: .55; cursor: wait; }
.kk-hand-back { border: 1px solid var(--border-4, #d9d7d2); background: var(--white, #fff); color: var(--ink, #16181d); }
.kk-thread[hidden], .kk-form[hidden] { display: none; }
.kk-hand label > b { font-weight: 500; }

/* Topics as a grid under the greeting, as on the MyOmniverse helper (owner,
   7 Nov 2026: the sideways row hid "Getting started" and the rest). */
.kk-pick { margin: 2px 0 4px; }
.kk-pick-label { margin: 4px 2px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6b6f76); }
.kk-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kk-pick-btn {
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 9px 12px;
  border: 1px solid var(--border, #eceae6); border-radius: 12px; background: var(--white, #fff);
  color: var(--ink, #16181d); font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.25;
  text-align: left; cursor: pointer; transition: border-color .14s ease, background-color .14s ease;
}
.kk-pick-btn:hover { border-color: var(--red-border-2, #f2b8b2); background: var(--red-tint, #fff5f3); }
.kk-pick-btn:focus-visible { outline: 2px solid var(--red, #d32b25); outline-offset: 2px; }
.kk-pick-btn.is-hl, .kk-pick-btn.is-person { border-color: var(--red-border-2, #f2b8b2); color: var(--red-deep, #a51f1a); }
.kk-pick-ico { flex: none; font-size: 17px; line-height: 1; }
.kk-pick-btn.is-wide { grid-column: 1 / -1; justify-content: center; }
