/* ===========================================================================
   Site assistant. Appended to bva.css by the build.

   Sits above everything except the page's own pop-up, which is z-index 90 and
   must win, because a chat bubble floating over a modal reads as broken.
   =========================================================================== */

.asst { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 70; }

/* ---- the button ---- */
.asst-fab {
  position: relative; display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--gold); color: var(--indigo);
  border: 0; cursor: pointer; padding: 0;
  box-shadow: 0 0.5rem 1.5rem rgba(42, 16, 99, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.asst-fab:hover { transform: translateY(-2px); box-shadow: 0 0.7rem 1.9rem rgba(42,16,99,0.38); }
.asst-fab:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.asst-fab svg { width: 1.55rem; height: 1.55rem; }
.asst-fab-i, .asst-fab-x {
  position: absolute; display: grid; place-items: center;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.asst-fab-x { opacity: 0; transform: rotate(-45deg) scale(0.7); }
.asst.is-open .asst-fab-i { opacity: 0; transform: rotate(45deg) scale(0.7); }
.asst.is-open .asst-fab-x { opacity: 1; transform: none; }

/* ---- the panel ---- */
.asst-panel {
  position: absolute; right: 0; bottom: 4.35rem;
  width: min(23rem, calc(100vw - 2.5rem));
  background: #fff; color: var(--ink, #1a1330);
  border-radius: 1.1rem; overflow: hidden;
  border: 1px solid rgba(42, 16, 99, 0.12);
  box-shadow: 0 1.5rem 3rem rgba(42, 16, 99, 0.24);
  display: flex; flex-direction: column;
  transform-origin: bottom right;
  opacity: 0; transform: translateY(0.6rem) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.asst.is-open .asst-panel { opacity: 1; transform: none; }

.asst-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.95rem 1.05rem; background: var(--indigo); color: var(--white-gold);
}
.asst-head strong { display: block; font-family: var(--display); font-size: 0.98rem; }
.asst-sub { display: block; font-size: 0.74rem; opacity: 0.7; letter-spacing: 0.04em; }
.asst-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 0.3rem rgba(255, 181, 71, 0.2); flex: none;
}
.asst-close {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: inherit; opacity: 0.65; padding: 0.2rem; display: grid; place-items: center;
}
.asst-close:hover { opacity: 1; }
.asst-close svg { width: 1.05rem; height: 1.05rem; }

.asst-log {
  padding: 1rem; display: grid; gap: 0.7rem; align-content: start;
  max-height: min(24rem, 52vh); overflow-y: auto; overscroll-behavior: contain;
  background: var(--veil);
}
.asst-msg p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.asst-bot {
  background: #fff; padding: 0.75rem 0.9rem; border-radius: 0.85rem 0.85rem 0.85rem 0.25rem;
  border: 1px solid rgba(42, 16, 99, 0.08); justify-self: start; max-width: 92%;
}
.asst-you {
  background: var(--indigo); color: var(--white-gold);
  padding: 0.6rem 0.85rem; border-radius: 0.85rem 0.85rem 0.25rem 0.85rem;
  justify-self: end; max-width: 85%;
}
.asst-link {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.55rem;
  font-family: var(--display); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold-deep); text-decoration: none;
  border-bottom: 2px solid rgba(176, 116, 28, 0.3); padding-bottom: 0.1rem;
}
.asst-link + .asst-link { margin-left: 0.9rem; }
.asst-link:hover { border-bottom-color: var(--gold-deep); }

.asst-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-self: start; }
.asst-chip {
  background: #fff; border: 1px solid rgba(42, 16, 99, 0.16);
  color: var(--indigo); border-radius: 999px; padding: 0.45rem 0.8rem;
  font: inherit; font-size: 0.8rem; cursor: pointer; text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.asst-chip:hover { background: var(--indigo); color: var(--white-gold); border-color: var(--indigo); }

.asst-wait { display: flex; gap: 0.25rem; padding: 0.9rem; }
.asst-wait span {
  width: 0.4rem; height: 0.4rem; border-radius: 50%; background: rgba(42,16,99,0.35);
  animation: asstBounce 1.1s infinite ease-in-out;
}
.asst-wait span:nth-child(2) { animation-delay: 0.15s; }
.asst-wait span:nth-child(3) { animation-delay: 0.3s; }
@keyframes asstBounce { 0%,60%,100% { transform: none; opacity: 0.4; }
                        30% { transform: translateY(-0.28rem); opacity: 1; } }

.asst-form { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid rgba(42,16,99,0.1); }
.asst-input {
  flex: 1; border: 1px solid rgba(42, 16, 99, 0.18); border-radius: 999px;
  padding: 0.6rem 0.95rem; font: inherit; font-size: 0.88rem; color: inherit;
  background: #fff; min-width: 0;
}
.asst-input:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: transparent; }
.asst-send {
  flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0;
  background: var(--indigo); color: var(--white-gold); cursor: pointer;
  display: grid; place-items: center;
}
.asst-send:hover { background: var(--violet); }
.asst-send svg { width: 1.05rem; height: 1.05rem; }

.asst-foot {
  margin: 0; padding: 0 0.95rem 0.85rem; font-size: 0.72rem; line-height: 1.45;
  color: rgba(26, 19, 48, 0.6);
}
.asst-foot a { color: var(--gold-deep); }

@media (max-width: 480px) {
  .asst { right: 0.9rem; bottom: 0.9rem; }
  .asst-panel { width: calc(100vw - 1.8rem); bottom: 4rem; }
  .asst-log { max-height: 46vh; }
}

@media print { .asst { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .asst-fab, .asst-panel, .asst-fab-i, .asst-fab-x { transition: none; }
  .asst-wait span { animation: none; }
}
