/* Ask Presidential Billiards: chat widget styles. All selectors are scoped under .pba-root. */

.pba-root {
  /* Presidential Billiards: charcoal and grey from the site theme, Ebony Clay from the 2024 logo */
  --pba-navy: #231F20;
  --pba-header: #22333B;
  --pba-mid: #39393A;
  --pba-primary: #22333B;
  --pba-accent: #848484;
  --pba-soft: #D9D6D1;
  --pba-tint: #F5F4F2;
  --pba-text: #39393A;
  --pba-ink: #231F20;
  --pba-muted: #6B6B6D;
  --pba-line: #E6E3DF;
  --pba-grad: linear-gradient(90deg, #3B4D57 0%, #22333B 55%, #231F20 100%);
  --pba-font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pba-serif: "Source Serif Pro", "Source Serif 4", Georgia, "Times New Roman", serif;
  --pba-ease: cubic-bezier(.2, .8, .2, 1);
  --pba-ring: 0 0 0 3px rgba(132, 132, 132, .45);
}

/* ---------- Reset (defend against theme and Elementor globals) ---------- */
.pba-root,
.pba-root *,
.pba-root *::before,
.pba-root *::after {
  box-sizing: border-box;
}
.pba-root * {
  font-family: var(--pba-font);
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  word-spacing: normal;
}
.pba-root p,
.pba-root h2,
.pba-root h3,
.pba-root ul,
.pba-root ol,
.pba-root li,
.pba-root form,
.pba-root label {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-weight: inherit;
}
.pba-root button,
.pba-root input,
.pba-root textarea {
  margin: 0;
  padding: 0;
  border-radius: 0;
  max-width: none;
  font: inherit;
  font-family: var(--pba-font);
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: auto;
  line-height: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.pba-root button {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
}
.pba-root button:hover,
.pba-root button:focus {
  background-color: transparent;
  color: inherit;
}
.pba-root a {
  text-decoration: none;
  box-shadow: none;
  border: 0;
}
.pba-root img {
  max-width: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.pba-root [hidden] { display: none !important; }

.pba-root .pba-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pba-root .pba-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 0;
}
.pba-root .pba-icon svg { display: block; }

/* Focus ring on every control */
.pba-root a:focus-visible,
.pba-root button:focus-visible,
.pba-root input:focus-visible,
.pba-root textarea:focus-visible,
.pba-root .pba-log:focus-visible {
  outline: 2px solid var(--pba-accent);
  outline-offset: 2px;
}

/* ---------- Launcher ---------- */
.pba-root .pba-launcher {
  position: fixed;
  right: 24px;
  bottom: calc(24px + var(--pba-lift, 0px));
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--pba-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 28px -8px rgba(35, 31, 32, .55), 0 2px 6px rgba(35, 31, 32, .18), inset 0 1px 0 rgba(255, 255, 255, .22);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: background-position .5s var(--pba-ease), box-shadow .25s ease, transform .25s var(--pba-ease), padding .25s var(--pba-ease), width .25s var(--pba-ease);
}
.pba-root.pba-ready .pba-launcher {
  opacity: 1;
  transform: none;
  animation: pba-rise .6s var(--pba-ease) .5s backwards;
}
.pba-root .pba-launcher:hover {
  background: var(--pba-grad);
  background-size: 100% 100%;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px rgba(35, 31, 32, .6), 0 3px 8px rgba(35, 31, 32, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.pba-root .pba-launcher:focus { background: var(--pba-grad); background-size: 100% 100%; color: #fff; }
.pba-root .pba-launcher:focus-visible { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--pba-accent), 0 10px 28px -8px rgba(35, 31, 32, .55); }
.pba-root .pba-launcher:active { transform: scale(.97); }
.pba-root .pba-launcher-spark svg { width: 20px; height: 20px; }
.pba-root .pba-launcher-spark { animation: pba-twinkle 4.5s ease-in-out 1.4s infinite; }
.pba-root .pba-launcher-close { display: none; }
.pba-root .pba-launcher-label { font-size: 15px; font-weight: 600; color: #fff; line-height: 1; }

/* Launcher when the panel is open: compact round close control */
.pba-root.pba-is-open .pba-launcher {
  width: 52px;
  padding: 0;
  justify-content: center;
  background: var(--pba-navy);
}
.pba-root.pba-is-open .pba-launcher:hover,
.pba-root.pba-is-open .pba-launcher:focus { background: var(--pba-header); }
.pba-root.pba-is-open .pba-launcher-label,
.pba-root.pba-is-open .pba-launcher-spark { display: none; }
.pba-root.pba-is-open .pba-launcher-close { display: inline-flex; }

@keyframes pba-rise {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes pba-twinkle {
  0%, 86%, 100% { transform: rotate(0) scale(1); }
  92% { transform: rotate(18deg) scale(1.15); }
}

/* ---------- Panel ---------- */
.pba-root .pba-panel {
  position: fixed;
  right: 24px;
  bottom: calc(92px + var(--pba-lift, 0px));
  z-index: 99991;
  display: flex;
  flex-direction: column;
  width: var(--pba-w-desktop, 400px);
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 120px - var(--pba-lift, 0px));
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  color: var(--pba-text);
  font-family: var(--pba-font);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 30px 70px -20px rgba(35, 31, 32, .45), 0 10px 24px -12px rgba(35, 31, 32, .25), 0 0 0 1px rgba(35, 31, 32, .06);
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .28s var(--pba-ease), visibility 0s linear .28s;
}
.pba-root.pba-is-open .pba-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .22s ease, transform .28s var(--pba-ease), visibility 0s;
}

/* Header */
.pba-root .pba-header {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 16px 20px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(132, 132, 132, .24) 0%, rgba(132, 132, 132, 0) 46%),
    radial-gradient(90% 140% at 0% 100%, rgba(34, 51, 59, .6) 0%, rgba(34, 51, 59, 0) 62%),
    var(--pba-header);
  color: #fff;
}
.pba-root .pba-header--nologo { padding-top: 16px; padding-bottom: 16px; }
.pba-root .pba-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 214, 209, 0) 0%, rgba(217, 214, 209, .6) 50%, rgba(217, 214, 209, 0) 100%);
}
.pba-root .pba-htop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.pba-root .pba-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}
.pba-root .pba-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 200px;
  flex: none;
}
.pba-root .pba-titles { min-width: 0; padding-right: 8px; }
.pba-root .pba-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--pba-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff;
}
.pba-root .pba-title-spark { color: var(--pba-soft); }
.pba-root .pba-title-spark svg { width: 17px; height: 17px; }
.pba-root .pba-subtitle {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--pba-soft);
}
.pba-root .pba-hactions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.pba-root .pba-hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--pba-soft);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pba-root .pba-hbtn:hover,
.pba-root .pba-hbtn:focus-visible {
  background-color: rgba(255, 255, 255, .1);
  color: #fff;
}
.pba-root .pba-newchat {
  height: 30px;
  padding: 0 11px 0 9px;
  margin-right: 4px;
  border: 1px solid rgba(217, 214, 209, .3);
  border-radius: 999px;
}
.pba-root .pba-newchat:hover { border-color: rgba(255, 255, 255, .5); }

/* Scroll area */
.pba-root .pba-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(140% 60% at 50% 0%, rgba(245, 244, 242, .9) 0%, rgba(255, 255, 255, 0) 70%),
    #fff;
  scrollbar-width: thin;
  scrollbar-color: #D9D6D1 transparent;
}
.pba-root .pba-scroll::-webkit-scrollbar { width: 8px; }
.pba-root .pba-scroll::-webkit-scrollbar-thumb { background: #D9D6D1; border-radius: 8px; border: 2px solid #fff; }
.pba-root .pba-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  outline: none;
}

/* Empty state */
.pba-root .pba-empty {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pba-root .pba-starters-label {
  margin: 6px 0 -4px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pba-muted);
}
.pba-root .pba-starters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.pba-root .pba-starter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--pba-line);
  border-radius: 12px;
  background: #fff;
  color: var(--pba-navy);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--pba-ease), box-shadow .15s ease;
}
.pba-root .pba-starter:hover,
.pba-root .pba-starter:focus-visible {
  border-color: var(--pba-accent);
  background-color: #fff;
  color: var(--pba-navy);
  box-shadow: 0 6px 16px -10px rgba(35, 31, 32, .45);
  transform: translateY(-1px);
}
.pba-root .pba-starter-arrow { color: var(--pba-primary); opacity: .55; transition: opacity .15s ease, transform .15s var(--pba-ease); }
.pba-root .pba-starter:hover .pba-starter-arrow { opacity: 1; transform: translateX(2px); }

/* Messages */
.pba-root .pba-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  animation: pba-in .28s var(--pba-ease) both;
}
.pba-root .pba-msg--user { align-items: flex-end; }
.pba-root .pba-bubble {
  position: relative;
  max-width: 90%;
  padding: 11px 15px;
  border-radius: 16px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.pba-root .pba-msg--user .pba-bubble {
  max-width: 84%;
  background: var(--pba-navy);
  color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
  box-shadow: 0 6px 16px -10px rgba(35, 31, 32, .7);
}
.pba-root .pba-msg--assistant .pba-bubble {
  background: var(--pba-tint);
  color: var(--pba-ink);
  border-bottom-left-radius: 6px;
}
.pba-root .pba-msg--error .pba-bubble {
  background: #FFF6EC;
  color: #5B3A16;
  box-shadow: inset 3px 0 0 #E9A55A;
}
.pba-root .pba-msg--confirm .pba-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(132, 132, 132, .16), rgba(34, 51, 59, .08));
  box-shadow: inset 0 0 0 1px rgba(132, 132, 132, .45);
}
.pba-root .pba-confirm-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--pba-accent);
  color: #fff;
  margin-top: 1px;
}
.pba-root .pba-confirm-icon svg { width: 15px; height: 15px; }

@keyframes pba-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Markdown inside assistant bubbles */
.pba-root .pba-bubble p + p,
.pba-root .pba-bubble p + .pba-md-list,
.pba-root .pba-bubble .pba-md-list + p,
.pba-root .pba-bubble .pba-md-list + .pba-md-list { margin-top: 9px; }
.pba-root .pba-bubble strong { font-weight: 650; color: var(--pba-navy); }
.pba-root .pba-msg--user .pba-bubble strong { color: #fff; }
.pba-root .pba-md-h { font-weight: 650; color: var(--pba-navy); }
.pba-root .pba-md-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pba-root .pba-md-list li {
  position: relative;
  padding-left: 18px;
  margin: 0;
  list-style: none;
}
.pba-root .pba-md-list li + li { margin-top: 5px; }
.pba-root .pba-md-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pba-accent);
}
.pba-root .pba-md-ol { counter-reset: pba-ol; }
.pba-root .pba-md-ol li { counter-increment: pba-ol; padding-left: 22px; }
.pba-root .pba-md-ol li::before {
  content: counter(pba-ol) ".";
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  font-weight: 650;
  color: var(--pba-primary);
}
.pba-root .pba-link {
  color: var(--pba-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(34, 51, 59, .35);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.pba-root .pba-link:hover { color: var(--pba-navy); text-decoration-color: var(--pba-accent); }
.pba-root .pba-msg--error .pba-link { color: #7A4310; }

/* Page cards */
.pba-root .pba-cards-label {
  margin: 12px 0 6px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pba-muted);
}
.pba-root .pba-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 90%;
}
.pba-root .pba-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--pba-line);
  border-radius: 12px;
  background: #fff;
  color: var(--pba-ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(35, 31, 32, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s var(--pba-ease);
}
.pba-root .pba-card:hover,
.pba-root .pba-card:focus-visible {
  border-color: var(--pba-accent);
  box-shadow: 0 8px 20px -12px rgba(35, 31, 32, .45);
  transform: translateY(-1px);
  color: var(--pba-ink);
}
.pba-root .pba-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.pba-root .pba-card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pba-navy);
}
.pba-root .pba-card-why {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--pba-muted);
}
.pba-root .pba-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pba-tint);
  color: var(--pba-primary);
  transition: background .15s ease, color .15s ease, transform .15s var(--pba-ease);
}
.pba-root .pba-card:hover .pba-card-arrow,
.pba-root .pba-card:focus-visible .pba-card-arrow {
  background: var(--pba-grad);
  color: #fff;
  transform: translateX(2px);
}

/* CTA row and buttons */
.pba-root .pba-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.pba-root .pba-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-position .4s var(--pba-ease), box-shadow .2s ease, border-color .15s ease, color .15s ease, transform .15s var(--pba-ease);
}
.pba-root .pba-btn--primary,
.pba-root .pba-btn--primary:focus,
.pba-root button.pba-btn--primary:hover {
  background: var(--pba-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(34, 51, 59, .8);
}
.pba-root .pba-btn--primary:hover,
.pba-root button.pba-btn--primary:hover {
  color: #fff;
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 10px 22px -10px rgba(34, 51, 59, .9);
}
.pba-root .pba-btn--primary[disabled] { opacity: .7; cursor: progress; }
.pba-root .pba-btn--ghost {
  border: 1px solid #D9D6D1;
  background: #fff;
  color: var(--pba-primary);
}
.pba-root .pba-btn--ghost:hover,
.pba-root .pba-btn--ghost:focus-visible {
  border-color: var(--pba-primary);
  background: #fff;
  color: var(--pba-primary);
}
.pba-root .pba-btn--text {
  height: 40px;
  padding: 0 12px;
  color: var(--pba-muted);
  font-weight: 500;
}
.pba-root .pba-btn--text:hover { color: var(--pba-navy); }

/* Suggestions */
.pba-root .pba-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
  animation: pba-in .3s var(--pba-ease) .08s both;
}
.pba-root .pba-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #DEDAD5;
  border-radius: 999px;
  background: #fff;
  color: var(--pba-primary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.pba-root .pba-chip:hover,
.pba-root .pba-chip:focus-visible {
  border-color: var(--pba-accent);
  background-color: #F5F4F2;
  color: var(--pba-navy);
}

/* Typing indicator */
.pba-root .pba-typing .pba-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}
.pba-root .pba-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pba-primary);
  opacity: .35;
  animation: pba-bounce 1.2s ease-in-out infinite;
}
.pba-root .pba-dot:nth-child(3) { animation-delay: .15s; }
.pba-root .pba-dot:nth-child(4) { animation-delay: .3s; }
@keyframes pba-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: .9; }
}

/* ---------- Lead form ---------- */
.pba-root .pba-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
  border: 1px solid var(--pba-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px -20px rgba(35, 31, 32, .5);
  animation: pba-in .3s var(--pba-ease) both;
  position: relative;
  overflow: hidden;
}
.pba-root .pba-lead::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--pba-grad);
}
.pba-root .pba-lead-title {
  font-family: var(--pba-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--pba-navy);
}
.pba-root .pba-lead-intro {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--pba-muted);
}
.pba-root .pba-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pba-root .pba-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  min-width: 0;
}
.pba-root .pba-field--half { flex: 1 1 calc(50% - 5px); }
.pba-root .pba-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pba-navy);
}
.pba-root .pba-req { color: var(--pba-primary); }
.pba-root .pba-field-input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 8px 11px;
  border: 1px solid #DCD8D3;
  border-radius: 10px;
  background: #FCFBFA;
  color: var(--pba-ink);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.pba-root textarea.pba-field-input {
  height: auto;
  min-height: 70px;
  resize: vertical;
}
.pba-root .pba-field-input:hover { border-color: #C9C4BE; }
.pba-root .pba-field-input:focus,
.pba-root .pba-field-input:focus-visible {
  outline: 0;
  border-color: var(--pba-accent);
  background: #fff;
  box-shadow: var(--pba-ring);
}
.pba-root .pba-field-input[aria-invalid="true"] { border-color: #D2556B; }
.pba-root .pba-field-error {
  font-size: 12px;
  line-height: 1.3;
  color: #B4324A;
}
.pba-root .pba-field-error:empty { display: none; }
.pba-root .pba-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 10px;
  align-items: start;
}
.pba-root .pba-check {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #B5B0AA;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.pba-root .pba-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.pba-root .pba-check:checked { background: var(--pba-primary); border-color: var(--pba-primary); }
.pba-root .pba-check:checked::after { opacity: 1; }
.pba-root .pba-check[aria-invalid="true"] { border-color: #D2556B; }
.pba-root .pba-check:focus-visible { outline: 2px solid var(--pba-accent); outline-offset: 2px; }
.pba-root .pba-consent-label {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--pba-text);
  cursor: pointer;
}
.pba-root .pba-consent .pba-field-error { grid-column: 2; }
.pba-root .pba-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.pba-root .pba-lead-status:empty { display: none; }
.pba-root .pba-lead-status--error {
  padding: 10px 12px;
  border-radius: 10px;
  background: #FDF0F2;
  color: #8A2236;
  font-size: 13px;
  line-height: 1.45;
}
.pba-root .pba-lead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Footer / composer ---------- */
.pba-root .pba-footer {
  flex: none;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--pba-line);
  background: #fff;
}
.pba-root .pba-composer { position: relative; }
.pba-root .pba-inputwrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #DCD8D3;
  border-radius: 16px;
  background: #FCFBFA;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.pba-root .pba-inputwrap:focus-within {
  border-color: var(--pba-accent);
  background: #fff;
  box-shadow: var(--pba-ring);
}
.pba-root .pba-input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 22px;
  max-height: 120px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pba-ink);
  font-size: 14.5px;
  line-height: 22px;
  resize: none;
  overflow-y: hidden;
  box-sizing: content-box;
}
.pba-root .pba-input:focus,
.pba-root .pba-input:focus-visible { outline: 0; border: 0; box-shadow: none; background: transparent; }
.pba-root .pba-input::placeholder { color: #8E8B87; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pba-root .pba-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--pba-grad);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(34, 51, 59, .9);
  transition: opacity .15s ease, transform .15s var(--pba-ease), filter .15s ease;
}
.pba-root .pba-send:hover,
.pba-root .pba-send:focus { background: var(--pba-grad); color: #fff; }
.pba-root .pba-send:hover:not([disabled]) { transform: translateY(-1px); filter: saturate(1.15); }
.pba-root .pba-send[disabled] {
  background: #E6E3DF;
  color: #A19D98;
  box-shadow: none;
  cursor: default;
}
.pba-root .pba-busy .pba-send[disabled] { cursor: progress; }
.pba-root .pba-counter {
  display: none;
  position: absolute;
  right: 54px;
  top: -20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  color: var(--pba-muted);
  font-variant-numeric: tabular-nums;
}
.pba-root .pba-counter--show { display: block; }
.pba-root .pba-counter--max { color: #B4324A; }
.pba-root .pba-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--pba-muted);
  text-align: center;
}
.pba-root .pba-note .pba-link { font-weight: 500; color: var(--pba-primary); }
.pba-root .pba-notebtn { all: unset; cursor: pointer; font: inherit; font-weight: 600; color: var(--pba-primary); text-decoration: underline; text-underline-offset: 2px; }
.pba-root .pba-notebtn:hover { color: var(--pba-navy); }
.pba-root .pba-notebtn:focus-visible { outline: 2px solid var(--pba-accent); outline-offset: 2px; border-radius: 3px; }

/* ---------- Continue chat (after following a link from the chat) ---------- */
.pba-root .pba-scrim { display: none; }
.pba-root.pba-has-resume .pba-launcher::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pba-soft);
  box-shadow: 0 0 0 2px var(--pba-header);
}
.pba-root.pba-is-open .pba-launcher::after { display: none; }
.pba-root .pba-resume {
  position: fixed;
  right: 24px;
  bottom: calc(88px + var(--pba-lift, 0px));
  z-index: 99990;
  display: flex;
  align-items: stretch;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(35, 31, 32, .45), 0 0 0 1px rgba(35, 31, 32, .08);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .3s var(--pba-ease);
}
.pba-root.pba-resume-in .pba-resume { opacity: 1; transform: none; }
.pba-root .pba-resume::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 2px 2px 3px -1px rgba(35, 31, 32, .12);
}
.pba-root .pba-resume-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 11px 6px 11px 16px;
  text-align: left;
}
.pba-root .pba-resume-open:hover .pba-resume-title { text-decoration: underline; text-underline-offset: 2px; }
.pba-root .pba-resume-title { font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--pba-navy); }
.pba-root .pba-resume-sub { font-size: 12.5px; line-height: 1.3; color: var(--pba-muted); }
.pba-root .pba-resume-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 44px;
  color: var(--pba-muted);
  border-radius: 0 14px 14px 0;
}
.pba-root .pba-resume-x:hover { color: var(--pba-navy); }
.pba-root .pba-resume-x svg { width: 15px; height: 15px; }

/* ---------- Mobile ---------- */
@media (max-width: 599.98px) {
  .pba-root .pba-launcher {
    right: 16px;
    bottom: calc(16px + var(--pba-lift, 0px));
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }
  .pba-root .pba-launcher-label { display: none; }
  .pba-root .pba-launcher-spark svg { width: 24px; height: 24px; }
  .pba-root.pba-is-open .pba-launcher { display: none; }

  .pba-root .pba-panel {
    top: 0;
    right: 0;
    bottom: var(--pba-lift, 0px);
    left: auto;
    width: var(--pba-w-mobile, 100%);
    max-width: none;
    height: calc(100% - var(--pba-lift, 0px));
    height: calc(100dvh - var(--pba-lift, 0px));
    max-height: none;
    border-radius: 0;
    transform: translateY(24px);
    transform-origin: bottom center;
  }
  .pba-root .pba-header {
    gap: 10px;
    padding: 10px 8px 14px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .pba-root .pba-close { width: 44px; height: 44px; }
  .pba-root .pba-newchat { height: 32px; }
  .pba-root .pba-log { padding: 18px 14px 16px; }
  .pba-root .pba-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .pba-root .pba-input { font-size: 16px; }
  .pba-root .pba-field-input { font-size: 16px; }
  .pba-root .pba-cards { width: 100%; }
  .pba-root .pba-bubble { max-width: 94%; }

  /* Narrower than the screen: a full-height panel from the right, with the page dimmed beside it */
  .pba-root.pba-mobile-partial .pba-panel {
    border-radius: 18px 0 0 18px;
    transform: translateX(24px);
    transform-origin: center right;
  }
  .pba-root.pba-mobile-partial.pba-is-open .pba-panel { transform: none; }
  .pba-root.pba-mobile-partial .pba-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(35, 31, 32, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility 0s linear .22s;
  }
  .pba-root.pba-mobile-partial.pba-is-open .pba-scrim { opacity: 1; visibility: visible; transition: opacity .22s ease, visibility 0s; }

  .pba-root .pba-resume { right: 16px; bottom: calc(84px + var(--pba-lift, 0px)); }
  .pba-root .pba-resume::after { right: 22px; }

  /* Lead form on phones: one field per row, large tap targets and readable text */
  .pba-root .pba-field--half { flex-basis: 100%; }
  .pba-root .pba-field-input { height: 54px; font-size: 17px; }
  .pba-root textarea.pba-field-input { height: auto; min-height: 96px; }
  .pba-root .pba-label { font-size: 15px; }
  .pba-root .pba-lead-intro,
  .pba-root .pba-consent-label { font-size: 17px; line-height: 1.5; }
  .pba-root .pba-check { width: 24px; height: 24px; }
  .pba-root .pba-consent { grid-template-columns: 26px 1fr; }
  .pba-root .pba-lead-submit { height: 54px; padding: 0 22px; font-size: 16px; }
  .pba-root .pba-btn--text { height: 54px; font-size: 16px; }
}
@media (max-width: 380px) {
  .pba-root .pba-field--half { flex-basis: 100%; }
  .pba-root .pba-logo { max-width: 150px; }
}
html.pba-lock,
html.pba-lock body {
  overflow: hidden !important;
}

/* Short desktop viewports */
@media (min-width: 600px) and (max-height: 520px) {
  .pba-root .pba-panel { bottom: calc(84px + var(--pba-lift, 0px)); max-height: calc(100vh - 100px - var(--pba-lift, 0px)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pba-root *,
  .pba-root *::before,
  .pba-root *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .pba-root .pba-launcher { opacity: 1; transform: none; }
  .pba-root .pba-launcher-spark { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .pba-root { display: none !important; }
}
