/* Ask Carl: The Whisky Rebellion chat widget styles. All selectors are scoped under .twra-root.
   Black and whisky brown, with the site's own fonts (Special Elite headings, Cabin body). */

.twra-root {
  --twra-dark: #111111;          /* TWR black */
  --twra-header: #000000;        /* TWR black, as the site header */
  --twra-blue: #6B3A1C;          /* whisky brown: links and accents */
  --twra-primary: #6B3A1C;       /* whisky brown: buttons (white text 9.3:1) */
  --twra-sky: #A8693F;           /* amber: focus rings and highlights */
  --twra-border: #E6E0DA;
  --twra-tint: #F7F3EF;          /* warm paper */
  --twra-text: #1A1A1A;
  --twra-ink: #1A1A1A;
  --twra-muted: #4A4440;
  --twra-faint: #8A817A;
  --twra-line: #E6E0DA;
  --twra-alert: #DC2626;
  --twra-alert-ink: #B91C1C;
  --twra-grad: linear-gradient(90deg, #000000 0%, #2B1A0F 55%, #6B3A1C 100%);
  --twra-font: Cabin, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --twra-head: "Special Elite", Cabin, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --twra-ease: cubic-bezier(.2, .8, .2, 1);
  --twra-ring: 0 0 0 3px rgba(168, 105, 63, .45);
}

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

.twra-root .twra-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;
}

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

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

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

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

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

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

/* Header */
.twra-root .twra-header {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 16px 18px;
  background:
    radial-gradient(130% 170% at 100% 0%, rgba(168, 105, 63, .34) 0%, rgba(168, 105, 63, 0) 48%),
    radial-gradient(90% 140% at 0% 100%, rgba(107, 58, 28, .6) 0%, rgba(107, 58, 28, 0) 62%),
    var(--twra-header);
  color: #fff;
}
.twra-root .twra-header--nologo { padding-top: 16px; padding-bottom: 16px; }
.twra-root .twra-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--twra-grad);
  opacity: .9;
}
.twra-root .twra-htop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.twra-root .twra-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}
.twra-root .twra-logo {
  display: block;
  height: 22px;
  width: auto;
  max-width: 200px;
  flex: none;
}
.twra-root .twra-titles { min-width: 0; padding-right: 8px; }
.twra-root .twra-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #fff;
}
.twra-root .twra-title-spark { color: var(--twra-sky); }
.twra-root .twra-title-spark svg { width: 17px; height: 17px; }
.twra-root .twra-subtitle {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--twra-border);
}
.twra-root .twra-hactions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.twra-root .twra-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(--twra-border);
  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;
}
.twra-root .twra-hbtn:hover,
.twra-root .twra-hbtn:focus-visible {
  background-color: rgba(255, 255, 255, .1);
  color: #fff;
}
.twra-root .twra-newchat {
  height: 30px;
  padding: 0 11px 0 9px;
  margin-right: 4px;
  border: 1px solid rgba(230, 224, 218, .55);
  border-radius: 999px;
}
.twra-root .twra-newchat:hover { border-color: rgba(255, 255, 255, .5); }

/* Scroll area */
.twra-root .twra-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(247, 243, 239, .9) 0%, rgba(255, 255, 255, 0) 70%),
    #fff;
  scrollbar-width: thin;
  scrollbar-color: #D3C9BF transparent;
}
.twra-root .twra-scroll::-webkit-scrollbar { width: 8px; }
.twra-root .twra-scroll::-webkit-scrollbar-thumb { background: #D3C9BF; border-radius: 8px; border: 2px solid #fff; }
.twra-root .twra-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  outline: none;
}

/* Empty state */
.twra-root .twra-empty {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.twra-root .twra-starters-label {
  margin: 6px 0 -4px 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--twra-blue);
}
.twra-root .twra-starters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.twra-root .twra-starter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--twra-line);
  border-radius: 12px;
  background: #fff;
  color: var(--twra-dark);
  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(--twra-ease), box-shadow .15s ease;
}
.twra-root .twra-starter:hover,
.twra-root .twra-starter:focus-visible {
  border-color: var(--twra-sky);
  background-color: #fff;
  color: var(--twra-dark);
  box-shadow: 0 6px 16px -10px rgba(17, 17, 17, .45);
  transform: translateY(-1px);
}
.twra-root .twra-starter-arrow { color: var(--twra-primary); opacity: .55; transition: opacity .15s ease, transform .15s var(--twra-ease); }
.twra-root .twra-starter:hover .twra-starter-arrow { opacity: 1; transform: translateX(2px); }

/* Messages */
.twra-root .twra-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  animation: twra-in .28s var(--twra-ease) both;
}
.twra-root .twra-msg--user { align-items: flex-end; }
.twra-root .twra-bubble {
  position: relative;
  max-width: 90%;
  padding: 11px 15px;
  border-radius: 16px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.twra-root .twra-msg--user .twra-bubble {
  max-width: 84%;
  background: var(--twra-dark);
  color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
  box-shadow: 0 6px 16px -10px rgba(17, 17, 17, .7);
}
.twra-root .twra-msg--assistant .twra-bubble {
  background: var(--twra-tint);
  color: var(--twra-ink);
  border-bottom-left-radius: 6px;
}
.twra-root .twra-msg--error .twra-bubble {
  background: #FFF7ED;
  color: #92400E;
  box-shadow: inset 3px 0 0 #D97706;
}
.twra-root .twra-msg--confirm .twra-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(168, 105, 63, .14), rgba(107, 58, 28, .08));
  box-shadow: inset 0 0 0 1px rgba(168, 105, 63, .4);
}
.twra-root .twra-confirm-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--twra-sky);
  color: #fff;
  margin-top: 1px;
}
.twra-root .twra-confirm-icon svg { width: 15px; height: 15px; }

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

/* Markdown inside assistant bubbles */
.twra-root .twra-bubble p + p,
.twra-root .twra-bubble p + .twra-md-list,
.twra-root .twra-bubble .twra-md-list + p,
.twra-root .twra-bubble .twra-md-list + .twra-md-list { margin-top: 9px; }
.twra-root .twra-bubble strong { font-weight: 650; color: var(--twra-dark); }
.twra-root .twra-title,
.twra-root .twra-md-h,
.twra-root .twra-btn,
.twra-root .twra-launcher-label,
.twra-root .twra-card-title { font-family: var(--twra-head); font-weight: 700; }
.twra-root .twra-msg--user .twra-bubble strong { color: #fff; }
.twra-root .twra-md-h { font-weight: 650; color: var(--twra-dark); }
.twra-root .twra-md-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.twra-root .twra-md-list li {
  position: relative;
  padding-left: 18px;
  margin: 0;
  list-style: none;
}
.twra-root .twra-md-list li + li { margin-top: 5px; }
.twra-root .twra-md-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--twra-sky);
}
.twra-root .twra-md-ol { counter-reset: twra-ol; }
.twra-root .twra-md-ol li { counter-increment: twra-ol; padding-left: 22px; }
.twra-root .twra-md-ol li::before {
  content: counter(twra-ol) ".";
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  font-weight: 650;
  color: var(--twra-primary);
}
.twra-root .twra-link {
  color: var(--twra-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(107, 58, 28, .35);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.twra-root .twra-link:hover { color: var(--twra-dark); text-decoration-color: var(--twra-sky); }
.twra-root .twra-msg--error .twra-link { color: #92400E; }

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

/* CTA row and buttons */
.twra-root .twra-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.twra-root .twra-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(--twra-ease), box-shadow .2s ease, border-color .15s ease, color .15s ease, transform .15s var(--twra-ease);
}
.twra-root .twra-btn--primary,
.twra-root .twra-btn--primary:focus,
.twra-root button.twra-btn--primary:hover {
  background: var(--twra-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(107, 58, 28, .8);
}
.twra-root .twra-btn--primary:hover,
.twra-root button.twra-btn--primary:hover {
  color: #fff;
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 10px 22px -10px rgba(107, 58, 28, .9);
}
.twra-root .twra-btn--primary[disabled] { opacity: .7; cursor: progress; }
.twra-root .twra-btn--ghost {
  border: 1px solid var(--twra-line);
  background: #fff;
  color: var(--twra-primary);
}
.twra-root .twra-btn--ghost:hover,
.twra-root .twra-btn--ghost:focus-visible {
  border-color: var(--twra-primary);
  background: #fff;
  color: var(--twra-primary);
}
.twra-root .twra-btn--text {
  height: 40px;
  padding: 0 12px;
  color: var(--twra-muted);
  font-weight: 500;
}
.twra-root .twra-btn--text:hover { color: var(--twra-dark); }

/* Suggestions */
.twra-root .twra-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
  animation: twra-in .3s var(--twra-ease) .08s both;
}
.twra-root .twra-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #E6E0DA;
  border-radius: 999px;
  background: #fff;
  color: var(--twra-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;
}
.twra-root .twra-chip:hover,
.twra-root .twra-chip:focus-visible {
  border-color: var(--twra-sky);
  background-color: #F7F3EF;
  color: var(--twra-dark);
}

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

/* ---------- Lead form ---------- */
.twra-root .twra-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
  border: 1px solid var(--twra-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px -20px rgba(17, 17, 17, .5);
  animation: twra-in .3s var(--twra-ease) both;
  position: relative;
  overflow: hidden;
}
.twra-root .twra-lead::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--twra-grad);
}
.twra-root .twra-lead-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--twra-dark);
}
.twra-root .twra-lead-intro {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--twra-muted);
}
.twra-root .twra-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.twra-root .twra-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  min-width: 0;
}
.twra-root .twra-field--half { flex: 1 1 calc(50% - 5px); }
.twra-root .twra-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--twra-dark);
}
.twra-root .twra-req { color: var(--twra-primary); }
.twra-root .twra-field-input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--twra-line);
  border-radius: 10px;
  background: var(--twra-tint);
  color: var(--twra-ink);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.twra-root textarea.twra-field-input {
  height: auto;
  min-height: 70px;
  resize: vertical;
}
.twra-root .twra-field-input:hover { border-color: var(--twra-sky); }
.twra-root .twra-field-input:focus,
.twra-root .twra-field-input:focus-visible {
  outline: 0;
  border-color: var(--twra-sky);
  background: #fff;
  box-shadow: var(--twra-ring);
}
.twra-root .twra-field-input[aria-invalid="true"] { border-color: var(--twra-alert); }
.twra-root .twra-field-error {
  font-size: 12px;
  line-height: 1.3;
  color: var(--twra-alert-ink);
}
.twra-root .twra-field-error:empty { display: none; }
.twra-root .twra-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 10px;
  align-items: start;
}
.twra-root .twra-check {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #A9B4C6;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.twra-root .twra-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;
}
.twra-root .twra-check:checked { background: var(--twra-primary); border-color: var(--twra-primary); }
.twra-root .twra-check:checked::after { opacity: 1; }
.twra-root .twra-check[aria-invalid="true"] { border-color: var(--twra-alert); }
.twra-root .twra-check:focus-visible { outline: 2px solid var(--twra-sky); outline-offset: 2px; }
.twra-root .twra-consent-label {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--twra-text);
  cursor: pointer;
}
.twra-root .twra-consent .twra-field-error { grid-column: 2; }
.twra-root .twra-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.twra-root .twra-lead-status:empty { display: none; }
.twra-root .twra-lead-status--error {
  padding: 10px 12px;
  border-radius: 10px;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 13px;
  line-height: 1.45;
}
.twra-root .twra-lead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Footer / composer ---------- */
.twra-root .twra-footer {
  flex: none;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--twra-line);
  background: #fff;
}
.twra-root .twra-composer { position: relative; }
.twra-root .twra-inputwrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--twra-line);
  border-radius: 16px;
  background: var(--twra-tint);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.twra-root .twra-inputwrap:focus-within {
  border-color: var(--twra-sky);
  background: #fff;
  box-shadow: var(--twra-ring);
}
.twra-root .twra-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(--twra-ink);
  font-size: 14.5px;
  line-height: 22px;
  resize: none;
  overflow-y: hidden;
  box-sizing: content-box;
}
.twra-root .twra-input:focus,
.twra-root .twra-input:focus-visible { outline: 0; border: 0; box-shadow: none; background: transparent; }
.twra-root .twra-input::placeholder { color: #8A817A; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twra-root .twra-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--twra-blue);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(107, 58, 28, .9);
  transition: opacity .15s ease, transform .15s var(--twra-ease), filter .15s ease;
}
.twra-root .twra-send:hover,
.twra-root .twra-send:focus { background: var(--twra-grad); color: #fff; }
.twra-root .twra-send:hover:not([disabled]) { transform: translateY(-1px); filter: saturate(1.15); }
.twra-root .twra-send[disabled] {
  background: #E6EAF1;
  color: #8A817A;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}
.twra-root .twra-busy .twra-send[disabled] { cursor: progress; }
.twra-root .twra-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(--twra-muted);
  font-variant-numeric: tabular-nums;
}
.twra-root .twra-counter--show { display: block; }
.twra-root .twra-counter--max { color: var(--twra-alert-ink); }
.twra-root .twra-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--twra-muted);
  text-align: center;
}
.twra-root .twra-note .twra-link { font-weight: 500; color: var(--twra-primary); }
.twra-root .twra-notebtn { all: unset; cursor: pointer; font: inherit; font-weight: 600; color: var(--twra-primary); text-decoration: underline; text-underline-offset: 2px; }
.twra-root .twra-notebtn:hover { color: var(--twra-dark, #111111); }
.twra-root .twra-notebtn:focus-visible { outline: 2px solid #A8693F; outline-offset: 2px; border-radius: 3px; }

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

  .twra-root .twra-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    transform: translateY(24px);
    transform-origin: bottom center;
  }
  .twra-root .twra-header {
    gap: 10px;
    padding: 10px 8px 14px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .twra-root .twra-close { width: 44px; height: 44px; }
  .twra-root .twra-newchat { height: 32px; }
  .twra-root .twra-log { padding: 18px 14px 16px; }
  .twra-root .twra-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .twra-root .twra-panel { font-size: 17px; }
  .twra-root .twra-input { font-size: 17px; }
  .twra-root .twra-field--half { flex-basis: 100%; }   /* never side by side on mobile */
  .twra-root .twra-field-input {
    font-size: 17px;
    height: 54px;
    padding: 12px 14px;
  }
  .twra-root textarea.twra-field-input { height: auto; min-height: 96px; }
  .twra-root .twra-label { font-size: 13px; }
  .twra-root .twra-consent-label { font-size: 15px; }
  .twra-root .twra-check { width: 22px; height: 22px; }
  .twra-root .twra-consent { grid-template-columns: 24px 1fr; }
  .twra-root .twra-cards { width: 100%; }
  .twra-root .twra-bubble { max-width: 94%; }
}
@media (max-width: 380px) {
  .twra-root .twra-field--half { flex-basis: 100%; }
  .twra-root .twra-logo { max-width: 150px; }
}
html.twra-lock,
html.twra-lock body {
  overflow: hidden !important;
}

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .twra-root *,
  .twra-root *::before,
  .twra-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;
  }
  .twra-root .twra-launcher { opacity: 1; transform: none; }
  .twra-root .twra-launcher-spark { animation: none !important; }
}

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


/* ---------- Design pass: avatar, WhatsApp, feedback, cards ---------- */

/* Carl gets a face: an initial in an amber disc, in the header and on the launcher. */
.twra-root .twra-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-content: center;
  background: linear-gradient(135deg, #A8693F 0%, #6B3A1C 100%);
  color: #fff;
  font-family: var(--twra-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(0, 0, 0, .6);
}
.twra-root .twra-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.twra-root .twra-title { font-size: 19px; line-height: 1.15; letter-spacing: -.01em; }
.twra-root .twra-title .twra-title-spark { display: none; }
.twra-root .twra-subtitle { display: flex; align-items: center; gap: 7px; font-size: 13px; opacity: .92; }
.twra-root .twra-subtitle::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .22);
  flex: none;
}
.twra-root .twra-launcher-avatar {
  width: 30px; height: 30px; font-size: 14px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
  margin-left: -6px;
}
.twra-root.twra-is-open .twra-launcher-avatar { display: none; }

/* WhatsApp: filled in WhatsApp green with navy type, AAA against the green. */
.twra-root .twra-btn--wa {
  background: #25D366;
  color: #111111;
  border: 0;
}
.twra-root .twra-btn--wa:hover,
.twra-root .twra-btn--wa:focus-visible { background: #1EBE5A; color: #111111; transform: translateY(-1px); }
.twra-root .twra-btn--wa .twra-icon { color: #111111; }
.twra-root .twra-notebtn--wa {
  display: inline;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.twra-root .twra-notebtn--wa .twra-icon { display: inline-block; vertical-align: -3px; margin-right: 3px; color: #128C7E; }
.twra-root .twra-notebtn--wa .twra-icon svg { width: 14px; height: 14px; }

/* Was this helpful? Quiet, right-aligned, out of the way until it is wanted. */
.twra-root .twra-feedback {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: -2px 2px 0 0;
  font-size: 12.5px;
  color: var(--twra-muted);
}
.twra-root .twra-feedback-label { margin-right: 4px; }
.twra-root .twra-thumb {
  all: unset;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--twra-muted);
  transition: background-color .15s ease, color .15s ease, transform .15s var(--twra-ease);
}
.twra-root .twra-thumb:hover { background: var(--twra-tint); color: var(--twra-blue); transform: translateY(-1px); }
.twra-root .twra-thumb:focus-visible { outline: 0; box-shadow: var(--twra-ring); }
.twra-root .twra-feedback-thanks { font-size: 12.5px; color: var(--twra-muted); }

/* Related page cards: a blue accent bar and a lift on hover. */
.twra-root .twra-card {
  position: relative;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .2s ease, transform .18s var(--twra-ease);
}
.twra-root .twra-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--twra-grad);
  opacity: 0;
  transition: opacity .15s ease;
}
.twra-root .twra-card:hover,
.twra-root .twra-card:focus-visible {
  border-color: var(--twra-sky);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -16px rgba(17, 17, 17, .5);
}
.twra-root .twra-card:hover::before,
.twra-root .twra-card:focus-visible::before { opacity: 1; }

/* The site's own WhatsApp bubble sits just above the launcher; hide it while the panel is open. */
html.twra-open .ht-ctc,
html.twra-open .ht-ctc-chat { display: none !important; }

@media (max-width: 599.98px) {
  .twra-root .twra-avatar { width: 36px; height: 36px; font-size: 16px; }
  .twra-root .twra-feedback { font-size: 13px; }
  .twra-root .twra-thumb { width: 34px; height: 34px; }
}

/* The avatar replaces the sparkle on the launcher. */
.twra-root .twra-launcher .twra-launcher-spark { display: none; }
.twra-root .twra-launcher { padding-left: 12px; }
@media (max-width: 599.98px) {
  .twra-root .twra-launcher .twra-launcher-avatar { margin: 0; width: 32px; height: 32px; font-size: 15px; }
}
.twra-root .twra-launcher .twra-launcher-avatar {
  background: #fff;
  color: var(--twra-blue);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}


/* ---------- Corner: the default is bottom left (twra-root--left) ---------- */
.twra-root.twra-root--left .twra-launcher { right: auto; left: 24px; }
.twra-root.twra-root--left .twra-panel { right: auto; left: 24px; transform-origin: bottom left; }
@media (max-width: 599.98px) {
  .twra-root.twra-root--left .twra-launcher { right: auto; left: 16px; }
  .twra-root.twra-root--left .twra-panel { left: 0; }
}

/* ---------- Quote wizard ---------- */
.twra-root .twra-quote {
  border: 1px solid var(--twra-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px -24px rgba(17, 17, 17, .45);
  overflow: hidden;
}
.twra-root .twra-quote-head { padding: 12px 14px 0; }
.twra-root .twra-quote-top { display: flex; align-items: center; gap: 10px; }
.twra-root .twra-quote-eyebrow {
  font-family: var(--twra-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--twra-blue);
}
.twra-root .twra-quote-count { margin-left: auto; font-size: 12.5px; color: var(--twra-muted); white-space: nowrap; }
.twra-root .twra-quote-close { width: 30px; height: 30px; color: var(--twra-muted); background: transparent; border: 0; border-radius: 8px; display: inline-grid; place-content: center; cursor: pointer; }
.twra-root .twra-quote-close:hover { background: var(--twra-tint); color: var(--twra-dark); }
.twra-root .twra-quote-bar { height: 4px; margin: 10px 0 0; border-radius: 999px; background: var(--twra-tint); overflow: hidden; }
.twra-root .twra-quote-bar span { display: block; height: 100%; background: var(--twra-grad); border-radius: 999px; transition: width .35s var(--twra-ease); }
.twra-root .twra-quote-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.twra-root .twra-crumb {
  all: unset;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--twra-tint);
  color: var(--twra-dark);
  border: 1px solid transparent;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.twra-root .twra-crumb:hover,
.twra-root .twra-crumb:focus-visible { border-color: var(--twra-sky); color: var(--twra-blue); }
.twra-root .twra-quote-body { padding: 14px 14px 6px; }
.twra-root .twra-quote-q {
  font-family: var(--twra-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--twra-dark);
  margin: 0 0 4px;
}
.twra-root .twra-quote-desc { font-size: 14px; color: var(--twra-muted); margin: 0 0 10px; line-height: 1.5; }
.twra-root .twra-quote-controls { margin-top: 10px; }
.twra-root .twra-opts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.twra-root .twra-opt {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--twra-line);
  border-radius: 12px;
  background: #fff;
  color: var(--twra-dark);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--twra-ease);
}
.twra-root .twra-opt span:first-child { flex: 1 1 auto; }
.twra-root .twra-opt .twra-opt-arrow { color: var(--twra-sky); opacity: 0; transition: opacity .15s ease, transform .15s var(--twra-ease); }
.twra-root .twra-opt:hover,
.twra-root .twra-opt:focus-visible { border-color: var(--twra-sky); background: #FBF9F7; transform: translateY(-1px); }
.twra-root .twra-opt:hover .twra-opt-arrow,
.twra-root .twra-opt:focus-visible .twra-opt-arrow { opacity: 1; transform: translateX(2px); }
.twra-root .twra-opt:focus-visible { box-shadow: var(--twra-ring); }
.twra-root .twra-opt--on { border-color: var(--twra-blue); background: #F7F3EF; }
.twra-root .twra-opt--on .twra-opt-arrow { opacity: 1; color: var(--twra-blue); }
.twra-root .twra-measure { display: flex; gap: 8px; align-items: stretch; }
.twra-root .twra-measure .twra-field-input { flex: 1 1 auto; height: 46px; font-size: 16px; }
.twra-root textarea.twra-quote-input { height: auto; min-height: 84px; }
.twra-root .twra-units { display: inline-flex; border: 1px solid var(--twra-line); border-radius: 10px; overflow: hidden; background: var(--twra-tint); flex: none; }
.twra-root .twra-unit {
  all: unset;
  cursor: pointer;
  padding: 0 12px;
  display: inline-grid;
  place-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--twra-muted);
  min-width: 44px;
  transition: background-color .15s ease, color .15s ease;
}
.twra-root .twra-unit + .twra-unit { border-left: 1px solid var(--twra-line); }
.twra-root .twra-unit--on { background: var(--twra-blue); color: #fff; }
.twra-root .twra-unit:focus-visible { box-shadow: inset 0 0 0 2px var(--twra-sky); }
.twra-root .twra-unit--static { cursor: default; border: 1px solid var(--twra-line); border-radius: 10px; background: var(--twra-tint); }
.twra-root .twra-quote-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.twra-root .twra-quote-back { margin-left: auto; }
.twra-root .twra-quote-foot { padding: 8px 14px 12px; font-size: 12.5px; color: var(--twra-muted); border-top: 1px solid var(--twra-tint); margin-top: 6px; }
.twra-root .twra-quote-form .twra-fields { margin-bottom: 10px; }
.twra-root .twra-starter--quote {
  flex-wrap: wrap;
  background: linear-gradient(135deg, #111111 0%, #6B3A1C 100%);
  border-color: transparent;
  color: #fff;
}
.twra-root .twra-starter--quote:hover,
.twra-root .twra-starter--quote:focus-visible { border-color: var(--twra-sky); color: #fff; }
.twra-root .twra-starter--quote .twra-starter-sub { flex-basis: 100%; order: 3; font-size: 12.5px; font-weight: 400; opacity: .85; margin-top: 2px; }
.twra-root .twra-starter--quote .twra-starter-arrow { color: #fff; }
@media (max-width: 599.98px) {
  .twra-root .twra-opt { min-height: 54px; font-size: 17px; }
  .twra-root .twra-measure { flex-wrap: wrap; }
  .twra-root .twra-measure .twra-field-input { height: 54px; font-size: 17px; flex-basis: 100%; }
  .twra-root .twra-units { width: 100%; }
  .twra-root .twra-unit { flex: 1 1 0; height: 48px; }
  .twra-root .twra-quote-q { font-size: 19px; }
}


/* ---------- Phones: close label, page hint, compact header ---------- */
.twra-root .twra-close .twra-close-label { display: none; }
.twra-root .twra-cards-hint { display: none; margin: 6px 0 0; font-size: 12px; color: var(--twra-muted); }
@media (max-width: 599.98px) {
  .twra-root .twra-close { width: auto; padding: 0 12px; gap: 6px; border-radius: 999px; }
  .twra-root .twra-close .twra-close-label { display: inline; font-size: 14px; font-weight: 600; }
  .twra-root .twra-cards-hint { display: block; font-size: 13px; }
  .twra-root .twra-newchat { height: 36px; width: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .twra-root .twra-newchat span:not(.twra-icon) { display: none; }
  .twra-root .twra-title { font-size: 17px; }
  .twra-root .twra-subtitle { font-size: 12px; }
}


/* ---------- The Whisky Rebellion: stacked above the site's WhatsApp bubble (50px, 15px from the corner) ---------- */
.twra-root.twra-root--right .twra-launcher { right: 15px; bottom: 80px; }
.twra-root.twra-root--right .twra-panel { right: 15px; bottom: 144px; max-height: calc(100vh - 164px); }
.twra-root .twra-title { font-family: var(--twra-head); font-weight: 400; letter-spacing: .01em; }

/* Wider panel, chosen by the visitor on desktop */
.twra-root .twra-wide-off { display: none; }
.twra-root.twra-wide .twra-wide-on { display: none; }
.twra-root.twra-wide .twra-wide-off { display: inline-flex; }
@media (min-width: 600px) {
  .twra-root.twra-wide .twra-panel { width: min(760px, calc(100vw - 40px)); max-width: none; height: min(840px, calc(100vh - 164px)); }
}
@media (max-width: 799.98px) {
  .twra-root .twra-wide-btn { display: none; }
}

/* "Continue the conversation" prompt, phones only, after a page link closed the chat */
.twra-root .twra-nudge {
  position: fixed; right: 84px; bottom: 86px; z-index: 99990;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px 4px 4px 14px; border-radius: 999px;
  background: #fff; color: var(--twra-ink);
  box-shadow: 0 8px 24px -8px rgba(17, 17, 17, .45), 0 0 0 1px var(--twra-line);
  animation: twra-rise .4s var(--twra-ease) backwards;
}
.twra-root .twra-nudge[hidden] { display: none; }
.twra-root .twra-nudge-go { all: unset; cursor: pointer; font: 600 15px/1.2 var(--twra-font); color: var(--twra-primary); padding: 8px 4px; }
.twra-root .twra-nudge-go:focus-visible, .twra-root .twra-nudge-x:focus-visible { outline: 2px solid var(--twra-sky); outline-offset: 2px; border-radius: 6px; }
.twra-root .twra-nudge-x { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; color: var(--twra-muted); }
.twra-root .twra-nudge-x .twra-icon svg { width: 14px; height: 14px; }
.twra-root.twra-is-open .twra-nudge { display: none; }
@media (max-width: 599.98px) {
  .twra-root.twra-root--right .twra-launcher { right: 12px; bottom: 74px; }
  .twra-root .twra-nudge { right: 76px; bottom: 80px; max-width: calc(100vw - 96px); }
}
