/*
 * Virtual assistant — modern consular pop-out panel.
 *
 * Professional, calm, trustworthy, and fully responsive across mobile and desktop.
 */

/* ---- stage --------------------------------------------------------------- */

.chat-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(120% 90% at 85% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%),
    radial-gradient(80% 60% at 10% 10%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 50%),
    var(--bg);
  font-family: var(--sans);
  color: var(--text);
  overflow-x: hidden;
}

/* ---- panel --------------------------------------------------------------- */

.chat {
  position: fixed;
  right: var(--s5);
  bottom: var(--s5);
  z-index: 40;

  display: flex;
  flex-direction: column;
  width: min(480px, calc(100vw - var(--s6)));
  height: min(720px, calc(100vh - var(--s8)));
  max-height: calc(100dvh - var(--s6));

  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow:
    0 4px 6px -1px rgb(9 20 34 / 6%),
    0 16px 40px -8px rgb(9 20 34 / 24%);
  overflow: hidden;

  transform-origin: 100% 100%;
  animation: panel-in 220ms var(--ease) both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* Embedded widget container adaptations */
html[data-embedded="true"],
html[data-embedded="true"] body,
html[data-embedded="true"] .chat-body {
  min-height: 100% !important;
  height: 100% !important;
  background: var(--surface) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html[data-embedded="true"] .chat {
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  animation: none !important;
}

/* ---- panel header -------------------------------------------------------- */

.chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-2));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.chat-head-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.chat-head h1 {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--s2);
  line-height: 1.2;
}

.chat-head h1::before {
  content: '';
  width: 3.5px;
  height: 15px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.chat-head .sub {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 2px 8px;
  margin-top: 2px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  width: fit-content;
  max-width: 100%;
}
.service-badge:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent);
}
.service-badge-chevron {
  font-size: 9px;
  opacity: 0.8;
  margin-left: 2px;
}
.service-badge[hidden] { display: none; }

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: var(--fs-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
}
.icon-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.icon-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---- breadcrumb ribbon --------------------------------------------------- */

.crumbs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s2) var(--s4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--track-data);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.crumbs::-webkit-scrollbar { display: none; }
.crumbs[hidden] { display: none; }

.crumb {
  padding: 3px var(--s2);
  background: transparent;
  color: var(--text-2);
  border: 0;
  border-radius: var(--r-control);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.crumb:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.crumb[aria-current='true'] {
  color: var(--text);
  font-weight: 650;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  cursor: default;
}
.crumb[aria-current='true']:hover {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.crumb-sep {
  color: var(--text-3);
  user-select: none;
  font-size: 10px;
}

/* ---- conversation thread ------------------------------------------------- */

.thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s4);
  scroll-behavior: smooth;
}

.turn {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: 100%;
}
.turn.from-user {
  align-items: flex-end;
}

.bubble {
  max-width: 92%;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  background: var(--surface);
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  box-shadow: 0 1px 2px rgb(9 20 34 / 4%);
}
.bubble > p { margin: 0; }
.bubble > p + p { margin-top: var(--s2); }

.turn.from-user .bubble {
  max-width: 85%;
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  border-radius: 14px 14px 4px 14px;
}
.turn.from-user .bubble p {
  color: var(--accent-ink);
}

.bubble.uncertain {
  border-left: 4px solid var(--warn);
  background: color-mix(in srgb, var(--surface) 95%, var(--warn-soft));
}
.bubble.handoff {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

/* Response card reading view */
.bubble .answer-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.bubble .answer-title {
  margin: 0;
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.bubble .answer-text {
  font-size: var(--fs-base);
  line-height: var(--lh-answer);
  white-space: pre-wrap;
  color: var(--text);
}
.bubble .answer-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.bubble .answer-text a:hover {
  color: var(--accent-hover);
}

.turn-note {
  margin: var(--s1) 0 0;
  font-size: var(--fs-xs);
  color: var(--text-3);
  font-weight: 500;
}

/* ---- welcome & service chooser gateway ----------------------------------- */

.welcome-box {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4);
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: var(--s1);
  box-shadow: 0 2px 6px rgb(9 20 34 / 4%);
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-size: var(--fs-2xs);
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--accent);
}

.welcome-box h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.25;
}

.welcome-box p {
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-2);
}

.service-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  width: 100%;
}

.service-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  box-shadow: 0 1px 3px rgb(9 20 34 / 4%);
}

.service-card:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(9 20 34 / 8%);
}

.service-card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
}

.service-card:hover .service-card-icon {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.service-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.service-card-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.service-card-desc {
  font-size: var(--fs-xs);
  color: var(--text-2);
  line-height: 1.35;
}

.service-card-tags {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: var(--track-data);
  margin-top: 1px;
}

.service-card-chevron {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-3);
  padding-left: var(--s1);
  transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.service-card:hover .service-card-chevron {
  color: var(--accent);
  transform: translateX(3px);
}

/* ---- option buttons ------------------------------------------------------ */

.options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.opt {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 10px var(--s4);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(9 20 34 / 3%);
  transition: all var(--t-fast) var(--ease);
}

.opt:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  transform: translateX(2px);
}

.opt:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none !important;
}

.opt::after {
  content: '›';
  margin-left: auto;
  color: var(--text-3);
  font-size: 16px;
  font-weight: 600;
  transition: transform var(--t-fast) var(--ease);
}

.opt:hover:not(:disabled)::after {
  color: var(--accent);
  transform: translateX(2px);
}

.opt.back {
  border-style: dashed;
  color: var(--text-2);
  background: transparent;
  min-height: 38px;
  font-weight: 500;
}
.opt.back::after { content: ''; }
.opt.back:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--text-3);
}

.opt.service-switch {
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--accent);
  font-weight: 600;
}
.opt.service-switch::after {
  content: '‹';
  margin-left: auto;
  font-size: 16px;
}

/* ---- typeahead suggest list ----------------------------------------------- */

.suggest {
  flex: 0 0 auto;
  margin: 0;
  padding: var(--s1);
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgb(9 20 34 / 6%);
}
.suggest[hidden] { display: none; }

.sug {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-control);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.sug[aria-selected='true'] {
  background: var(--accent-soft);
  color: var(--text);
}
.sug:hover {
  background: var(--surface-2);
}
.sug mark {
  background: var(--mark);
  color: var(--mark-ink);
  padding: 0 2px;
  border-radius: 2px;
}
.sug .sug-where {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---- composer input ------------------------------------------------------ */

.composer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-2));
  border-top: 1px solid var(--border);
}

.composer input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 var(--s4);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.composer input::placeholder {
  color: var(--text-3);
  opacity: 1;
}
.composer input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background: var(--surface);
}

.composer .btn {
  height: 42px;
  padding: 0 var(--s5);
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
}

/* ---- voice input button --------------------------------------------------- */

.mic {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 0 transparent;
  transition: all var(--t-fast) var(--ease);
}
.mic:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface);
}
.mic:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.mic:disabled {
  opacity: .5;
  cursor: default;
}
.mic .mic-icon-stop { display: none; }

.mic[data-state='recording'] {
  background: var(--rec);
  color: #fff;
  border-color: transparent;
  animation: mic-pulse 1.6s var(--ease) infinite;
}
.mic[data-state='recording'] .mic-icon { display: none; }
.mic[data-state='recording'] .mic-icon-stop { display: block; }
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--rec-ring); }
  50%      { box-shadow: 0 0 0 7px transparent; }
}

.mic[data-state='busy'] { color: var(--text-3); }
.mic[data-state='busy'] .mic-icon {
  animation: mic-breathe 1.2s var(--ease) infinite;
}
@keyframes mic-breathe {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

.voice-hint {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  padding: var(--s2) var(--s4);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-2xs);
  color: var(--text-2);
}
.voice-hint-icon { vertical-align: -2px; }
.voice-hint-close {
  margin-left: auto;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: none;
  color: var(--text-3);
  border: 0;
  border-radius: var(--r-control);
  cursor: pointer;
  font-size: var(--fs-2xs);
}
.voice-hint-close:hover {
  background: var(--surface);
  color: var(--text);
}

.chat-privacy {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px var(--s3) var(--s3);
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-2));
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
}

/* ---- states & responsive ------------------------------------------------- */

.thinking {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text-3);
  font-size: var(--fs-sm);
}
.thinking .spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

@media (max-width: 640px) {
  .chat {
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: panel-in-mobile 180ms var(--ease) both;
  }
  @keyframes panel-in-mobile {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
  .thread {
    padding: var(--s3);
    gap: var(--s3);
  }
  .composer {
    padding: var(--s2) var(--s3);
    padding-bottom: max(var(--s2), env(safe-area-inset-bottom));
  }
  .chat-head {
    padding-top: max(var(--s3), env(safe-area-inset-top));
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat, .mic[data-state='recording'], .mic[data-state='busy'] .mic-icon { animation: none; }
  .opt, .service-card { transition: none; }
}

@media (forced-colors: active) {
  .chat { border: 1px solid CanvasText; box-shadow: none; }
  .opt, .bubble, .composer input, .service-card { border: 1px solid CanvasText; }
}

/* ==========================================================================
   Google Forms View Mode
   ========================================================================== */

[data-view="form"] .composer,
[data-view="form"] .crumbs,
[data-view="form"] .voice-hint {
  display: none !important;
}

[data-view="form"] .thread {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: color-mix(in srgb, var(--surface-2) 40%, var(--bg));
}

@media (min-width: 641px) {
  [data-view="form"] .chat {
    width: min(540px, calc(100vw - var(--s6)));
  }
}

.gform-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 1px 3px rgb(9 20 34 / 4%),
    0 8px 24px -6px rgb(9 20 34 / 8%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: gform-fade-in 180ms var(--ease) both;
  margin-bottom: var(--s2);
}

@keyframes gform-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.gform-card-stripe {
  height: 9px;
  width: 100%;
  background: var(--accent);
}

.gform-stripe-success {
  background: #1e8e3e;
}

.gform-stripe-warn {
  background: var(--warn, #d97706);
}

.gform-card-header {
  padding: 16px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gform-badge {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.gform-title {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.gform-desc {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.4;
}

/* Progress bar inside the form */
.gform-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 10px;
}

.gform-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.gform-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 240ms var(--ease);
}

.gform-progress-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}

/* Radio buttons list */
.gform-form {
  display: flex;
  flex-direction: column;
}

.gform-radios {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px;
}

.gform-radio-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  transition: all var(--t-fast) var(--ease);
}

.gform-radio-row:hover {
  background: var(--surface-2);
}

.gform-radio-row:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.gform-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Authentic Google Forms circular radio indicator */
.gform-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}

.gform-radio-row:hover .gform-radio-circle {
  border-color: var(--accent);
}

.gform-radio-input:checked + .gform-radio-circle {
  border-color: var(--accent);
}

.gform-radio-input:focus-visible + .gform-radio-circle {
  box-shadow: 0 0 0 3px var(--focus-ring);
  border-color: var(--accent);
}

.gform-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 140ms cubic-bezier(0.4, 0, 0.2, 1);
}

.gform-radio-input:checked + .gform-radio-circle .gform-radio-dot {
  transform: scale(1);
}

.gform-radio-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  flex: 1;
}

/* Service chooser rows */
.gform-service-row {
  align-items: flex-start;
  padding: 12px;
}

.gform-service-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}

.gform-service-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.gform-service-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.gform-service-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.35;
}

.gform-service-tags {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: var(--track-data);
  margin-top: 1px;
}

/* "Other" row text input */
.gform-other-row {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.gform-other-input {
  flex: 1 1 200px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  font-size: 13px;
  color: var(--text);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.gform-other-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.gform-other-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface-2);
}

/* Google Forms footer navigation */
.gform-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  background: color-mix(in srgb, var(--surface) 95%, var(--surface-2));
  border-radius: 0 0 12px 12px;
}

.gform-footer-left,
.gform-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gform-btn-clear {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all var(--t-fast) var(--ease);
}

.gform-btn-clear:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.gform-btn-clear:disabled {
  opacity: 0.35;
  cursor: default;
}

.gform-btn-next,
.gform-btn-back {
  height: 38px;
  padding: 0 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gform-btn-next:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Google Forms response answer card */
.gform-card-answer .gform-answer-title {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.gform-answer-body {
  padding: 14px 20px;
  font-size: 14px;
  line-height: var(--lh-answer, 1.6);
  color: var(--text);
  white-space: pre-wrap;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.gform-answer-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.gform-answer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 95%, var(--surface-2));
}

.gform-btn-restart {
  height: 38px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.gform-btn-switch-service {
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
}

.gform-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  color: var(--text-2);
  font-size: 13.5px;
}

.gform-link {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
  font-weight: 500;
}

/* ---- Section 508 & WCAG 2.1 AA Accessibility Overrides ------------------- */

@media (forced-colors: active) {
  .chat,
  .icon-btn,
  .composer input,
  .service-badge,
  .btn,
  .crumb,
  .gform-card,
  .gform-btn-restart,
  .gform-btn-switch-service {
    border: 2px solid ButtonText !important;
  }

  :focus-visible {
    outline: 3px solid Highlight !important;
    outline-offset: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat,
  .icon-btn,
  .btn,
  .composer,
  .bubble,
  .crumb {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}


