/* chat.css - Namo chatbot */
#chat {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
}
.fab {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  background: var(--gold);
  color: var(--goldink);
  border-radius: 99px;
  padding: 10px 18px 10px 12px;
  font:
    800 15px Figtree,
    system-ui,
    sans-serif;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  animation: bob 3s ease-in-out infinite;
  transition: transform 0.15s;
}
.fab:hover {
  animation-play-state: paused;
}
.fab span {
  font-size: 22px;
  display: inline-block;
  transition: transform 0.3s;
}
.fab:hover {
  transform: scale(1.06);
}
.fab:hover span {
  transform: rotate(-15deg) scale(1.2);
}
.cpanel {
  width: min(380px, calc(100vw - 24px));
  height: min(560px, 76vh);
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop 0.25s ease;
}
.cpanel[hidden] {
  display: none;
}
.cpanel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  position: static;
  border: 0;
  backdrop-filter: none;
}
body.dark .cpanel > header {
  background: var(--gold);
  color: var(--goldink);
}
.cpanel header small {
  display: block;
  opacity: 0.8;
}
.cpanel header button {
  background: none;
  border: 0;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}
.clog {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.msg {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 14px;
  animation: cardIn 0.25s both;
}
.msg.bot {
  background: #eef4fd;
  color: #0a2f73;
  border-bottom-left-radius: 4px;
}
.msg.me {
  background: var(--brand);
  color: #fff;
  justify-self: end;
  border-bottom-right-radius: 4px;
}
body.dark .msg.bot {
  background: #17397a;
  color: #fff;
}
.msg ul {
  margin: 6px 0 8px;
  padding-left: 18px;
}
.msg .linkbtn {
  padding: 2px 0;
}
.typing {
  display: flex;
  gap: 4px;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mute);
  animation: dot 1s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot {
  50% {
    transform: translateY(-5px);
    opacity: 0.5;
  }
}
.minis {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.mini {
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fff;
  color: #0a2f73;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.mini:hover {
  transform: translateX(3px);
  border-color: var(--brand);
}
.mini em {
  font-style: normal;
  font-weight: 800;
  color: var(--brand);
}
.mini small {
  color: #3d63a0;
}
.cchips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 12px 8px;
}
.cchips button {
  white-space: nowrap;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 99px;
  padding: 5px 11px;
  font-size: 13px;
  cursor: pointer;
}
.cchips button:hover {
  background: var(--brand);
  color: #fff;
}
#chatForm {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
#chatForm input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
}
.cpanel > header {
  position: static;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 12px 16px;
  flex: none;
}
.cpanel > header > div {
  display: block;
}
.cpanel {
  padding: 0;
}
