/* CASA Q&A helper — bubble (bottom-right) and question-and-answer panel. Uses the site's colour tokens. */
.casa-qa { position: fixed; right: 24px; bottom: 24px; z-index: 60; font-family: var(--font-body); }

/* the bubble: CASA emblem on ink, inside a slowly turning cyan/magenta ring that gently "breathes" */
.casa-qa-bubble { position: relative; width: 62px; height: 62px; border: 0; padding: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--color-text); color: var(--color-bg); box-shadow: 0 10px 28px color-mix(in srgb, #201e1d 30%, transparent);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.casa-qa-bubble:hover { transform: translateY(-3px); }
.casa-qa-bubble:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.casa-qa-emblem { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: var(--color-bg); }
.casa-qa-emblem svg { width: 26px; height: 26px; display: block; color: var(--color-text); }
.casa-qa-ring { position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, var(--color-accent), transparent 35%, var(--color-accent-2) 55%, transparent 80%, var(--color-accent));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: casa-qa-turn 5s linear infinite; }
.casa-qa-bubble::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 45%, transparent); animation: casa-qa-pulse 2.8s ease-out infinite; }
.casa-qa-badge { position: absolute; top: -4px; right: -4px; z-index: 2; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--color-accent-2); color: #fff; font: 700 13px/1 var(--font-heading); box-shadow: 0 0 0 2px var(--color-bg); }
.casa-qa.is-open .casa-qa-ring, .casa-qa.is-open .casa-qa-bubble::after { animation-play-state: paused; }
.casa-qa.is-open .casa-qa-bubble::after { opacity: 0; }
@keyframes casa-qa-turn { to { transform: rotate(360deg); } }
@keyframes casa-qa-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 14px transparent; } }

/* one-time invitation beside the bubble */
.casa-qa-teaser { position: absolute; right: 76px; bottom: 10px; width: max-content; max-width: 230px; display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px 10px 14px; background: var(--color-bg); color: var(--color-text); font-size: 14px; line-height: 1.35;
  border: 1px solid color-mix(in srgb, var(--color-text) 85%, transparent); box-shadow: var(--shadow-md); cursor: pointer; animation: casa-qa-pop .4s cubic-bezier(.16, 1, .3, 1); }
.casa-qa-teaser::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--color-accent); }
.casa-qa-teaser[hidden] { display: none; }
.casa-qa-teaser-close { border: 0; background: none; color: var(--ink-70); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 0 0 4px; }
@keyframes casa-qa-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* the panel */
.casa-qa-panel { position: fixed; right: 24px; bottom: 100px; width: min(390px, calc(100vw - 32px)); height: min(640px, calc(100vh - 136px));
  display: flex; flex-direction: column; overflow: hidden; background: var(--color-bg); color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 85%, transparent); box-shadow: 0 24px 60px color-mix(in srgb, #201e1d 26%, transparent);
  opacity: 0; transform: translateY(12px); transform-origin: bottom right; transition: opacity .22s ease, transform .28s cubic-bezier(.16, 1, .3, 1); }
.casa-qa-panel.is-open { opacity: 1; transform: none; }
.casa-qa-panel[hidden] { display: none; }

.casa-qa-head { display: flex; align-items: center; gap: 12px; padding: 14px 10px 14px 16px; background: var(--color-text); color: var(--color-bg);
  border-bottom: 3px solid var(--color-accent); }
.casa-qa-head-emblem { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--color-bg); border-radius: 4px; }
.casa-qa-head-emblem svg { width: 22px; height: 22px; color: var(--color-text); }
.casa-qa-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.casa-qa-head-text strong { font-family: var(--font-heading); font-size: 17px; letter-spacing: -0.01em; }
.casa-qa-head-text span { font-size: 12.5px; opacity: .78; }
.casa-qa-icon { border: 0; background: none; color: inherit; width: 36px; height: 36px; border-radius: 4px; cursor: pointer; font-size: 22px; line-height: 1; opacity: .85; flex: none; }
.casa-qa-restart { font-size: 18px; }
.casa-qa-icon:hover { background: color-mix(in srgb, var(--color-bg) 15%, transparent); opacity: 1; }

.casa-qa-body { flex: 1; overflow-y: auto; padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 12px; background: var(--color-surface); overscroll-behavior: contain; }
.casa-qa-msg { display: flex; gap: 8px; align-items: flex-start; }
.casa-qa-msg.is-new { animation: casa-qa-pop .3s ease; }
.casa-qa-avatar { width: 26px; height: 26px; flex: none; display: grid; place-items: center; background: var(--color-bg); border: 1px solid var(--color-divider); border-radius: 4px; margin-top: 2px; }
.casa-qa-avatar svg { width: 14px; height: 14px; color: var(--color-text); }
.casa-qa-text { padding: 11px 14px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.casa-qa-text p { margin: 0 0 6px; } .casa-qa-text p:last-child { margin: 0; }
.casa-qa-text ul { margin: 4px 0; padding-left: 18px; }
.casa-qa-text a { color: var(--color-accent-700); }
.casa-qa-answer .casa-qa-text { background: var(--color-bg); border: 1px solid var(--color-divider); border-radius: 2px 12px 12px 12px; }
.casa-qa-question { justify-content: flex-end; }
.casa-qa-question .casa-qa-text { max-width: 85%; background: var(--color-text); color: var(--color-bg); font-family: var(--font-heading); font-weight: 600; border-radius: 12px 2px 12px 12px; }

/* question list: newspaper-style rows with chevrons */
.casa-qa-options { display: flex; flex-direction: column; margin: 2px 0 0 34px; background: var(--color-bg); border: 1px solid var(--color-divider); }
.casa-qa-label { padding: 9px 14px 7px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-70); border-bottom: 1px solid var(--color-divider); }
.casa-qa-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--color-divider);
  background: none; color: var(--color-text); text-align: left; font: 600 14.5px/1.35 var(--font-heading); cursor: pointer; transition: background .15s ease, color .15s ease; }
.casa-qa-option:last-of-type { border-bottom: 0; }
.casa-qa-option i { font-style: normal; font-size: 20px; line-height: 1; color: var(--color-accent); transition: transform .2s ease; }
.casa-qa-option:hover, .casa-qa-option:focus-visible { background: var(--color-accent-100); color: var(--color-accent-800); outline: none; }
.casa-qa-option:hover i, .casa-qa-option:focus-visible i { transform: translateX(3px); }
.casa-qa-back { align-self: flex-start; margin: 0; padding: 10px 14px; border: 0; border-top: 1px solid var(--color-divider); width: 100%; text-align: left;
  background: none; color: var(--color-accent-700); font: 14px/1.3 var(--font-body); cursor: pointer; }
.casa-qa-options .casa-qa-back:first-child { border-top: 0; }
.casa-qa-back:hover, .casa-qa-back:focus-visible { background: var(--color-surface); outline: none; text-decoration: underline; text-underline-offset: 3px; }

/* "Didn't find your answer?" — always visible at the bottom */
.casa-qa-contact { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; background: var(--color-accent-100); border-top: 1px solid var(--color-accent-300); }
.casa-qa-contact-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; line-height: 1.45; color: var(--color-accent-900); }
.casa-qa-contact-text strong { font-family: var(--font-heading); font-size: 15px; }
.casa-qa-email { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; background: var(--color-accent); color: #fff;
  font: 600 14.5px/1.2 var(--font-heading); text-decoration: none; border-radius: 2px; box-shadow: inset 0 -2px 0 var(--color-accent-700); transition: background .2s ease; }
.casa-qa-email:hover { background: var(--color-accent-600); color: #fff; }
.casa-qa-email svg { width: 18px; height: 18px; flex: none; }
.casa-qa-email span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* phones: the panel becomes a sheet above the bubble */
@media (max-width: 600px) {
  .casa-qa { right: 14px; bottom: 14px; }
  .casa-qa-bubble { width: 54px; height: 54px; }
  .casa-qa-emblem { width: 32px; height: 32px; }
  .casa-qa-emblem svg { width: 22px; height: 22px; }
  .casa-qa-panel { left: 8px; right: 8px; bottom: 78px; width: auto; height: calc(100svh - 96px); }
  .casa-qa-teaser { right: 66px; max-width: 190px; font-size: 13px; }
  .casa-qa-body { padding: 14px 12px 12px; }
  .casa-qa-options { margin-left: 0; }
  .casa-qa-text { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .casa-qa-ring, .casa-qa-bubble::after { animation: none; }
  .casa-qa-panel { transition: none; }
}
