/* Sandra chat assistant – uses the site's colour variables from styles.css */
.sandra-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 20px 7px 7px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--aqua, #19b8d0), var(--primary, #0a72c9));
  color: #fff; font: 600 .95rem "Inter", system-ui, sans-serif;
  box-shadow: 0 14px 30px -10px rgba(10,114,201,.65); transition: transform .18s ease;
}
.sandra-launcher:hover { transform: translateY(-2px); }
.sandra-launcher[hidden], .sandra-panel[hidden], .sandra-teaser[hidden] { display: none; }

.sandra-avatar {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: var(--primary, #0a72c9);
  display: grid; place-items: center; font: 700 1.1rem "Poppins", sans-serif;
}
.sandra-avatar i {
  position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--mint, #21b47c); border: 2px solid #fff;
}

.sandra-teaser {
  position: fixed; right: 22px; bottom: 90px; z-index: 1000; max-width: 290px;
  background: #fff; border-radius: 16px 16px 4px 16px; padding: 14px 36px 14px 16px;
  box-shadow: 0 18px 40px -14px rgba(13,35,56,.35); border: 1px solid var(--line, #e1e9f0);
  animation: sandra-pop .35s ease;
}
.sandra-teaser-text {
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  font: 500 .92rem/1.45 "Inter", system-ui, sans-serif; color: var(--ink, #0d2338);
}
.sandra-teaser-close {
  position: absolute; top: 6px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: none; color: var(--muted, #56687b); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.sandra-teaser-close:hover { background: var(--sky, #eef7fd); }

.sandra-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 1001;
  width: 380px; height: min(640px, calc(100vh - 44px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 20px; border: 1px solid var(--line, #e1e9f0);
  box-shadow: 0 30px 70px -20px rgba(13,35,56,.45);
  font-family: "Inter", system-ui, sans-serif; animation: sandra-pop .25s ease;
}
@keyframes sandra-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.sandra-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px;
  background: linear-gradient(135deg, var(--primary, #0a72c9), var(--aqua, #19b8d0)); color: #fff;
}
.sandra-who { flex: 1; line-height: 1.25; }
.sandra-who strong { display: block; font: 600 1.05rem "Poppins", sans-serif; }
.sandra-who span { font-size: .8rem; opacity: .9; }
.sandra-icon {
  width: 34px; height: 34px; border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center;
}
.sandra-icon:hover { background: rgba(255,255,255,.28); }

.sandra-log {
  flex: 1; overflow-y: auto; padding: 18px 14px; background: #f5f9fc;
  display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth;
}
.sandra-msg {
  max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.5;
  white-space: pre-line; overflow-wrap: anywhere;
}
.sandra-bot { align-self: flex-start; background: #fff; color: var(--ink, #0d2338); border: 1px solid var(--line, #e1e9f0); border-bottom-left-radius: 4px; }
.sandra-user { align-self: flex-end; background: var(--primary, #0a72c9); color: #fff; border-bottom-right-radius: 4px; }

.sandra-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.sandra-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9db3c7; animation: sandra-dot 1s infinite ease-in-out; }
.sandra-typing span:nth-child(2) { animation-delay: .15s; }
.sandra-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sandra-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.sandra-summary { width: 86%; padding: 6px 14px; white-space: normal; }
.sandra-row { display: grid; grid-template-columns: 42% 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line, #e1e9f0); font-size: .86rem; }
.sandra-row:last-child { border-bottom: 0; }
.sandra-k { color: var(--muted, #56687b); }
.sandra-v { font-weight: 500; }

.sandra-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 0 2px; }
.sandra-chip {
  border: 1.5px solid #b9dcf3; background: #fff; color: var(--primary-dark, #075a9f);
  border-radius: 999px; padding: 8px 14px; font: 500 .86rem "Inter", system-ui, sans-serif;
  cursor: pointer; transition: .15s ease; text-align: left;
}
.sandra-chip:hover { background: var(--primary, #0a72c9); border-color: var(--primary, #0a72c9); color: #fff; }
.sandra-chip.is-primary { background: var(--primary, #0a72c9); border-color: var(--primary, #0a72c9); color: #fff; }
.sandra-chip.is-primary:hover { background: var(--primary-dark, #075a9f); }

.sandra-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line, #e1e9f0); background: #fff; }
.sandra-form input {
  flex: 1; min-width: 0; padding: 11px 14px; border: 1.5px solid var(--line, #e1e9f0); border-radius: 999px;
  font: 400 .93rem "Inter", system-ui, sans-serif; background: #f9fbfd; color: var(--ink, #0d2338);
}
.sandra-form input:focus { outline: none; border-color: var(--primary, #0a72c9); background: #fff; }
.sandra-form button {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--primary, #0a72c9); color: #fff; display: grid; place-items: center;
}
.sandra-form button:hover { background: var(--primary-dark, #075a9f); }
.sandra-disclaimer { margin: 0; padding: 0 12px 10px; background: #fff; text-align: center; font-size: .72rem; color: var(--muted, #56687b); }

@media (max-width: 560px) {
  .sandra-launcher { right: 16px; bottom: 16px; padding: 6px; }
  .sandra-launcher-text { display: none; }
  .sandra-teaser { right: 16px; bottom: 82px; max-width: calc(100vw - 32px); }
  .sandra-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
  body.sandra-open { overflow: hidden; }
  .sandra-form input { font-size: 16px; } /* stops iPhone zooming in */
}
