/* Container */
.gfcrds { max-width: 720px; margin: 0 auto; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; }
.gfcrds-chat { border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; background: #ffffff; box-shadow: 0 6px 24px rgba(0,0,0,0.06); display: flex; flex-direction: column; }

/* Messages */
.gfcrds-messages { padding: 18px; max-height: 60vh; overflow: auto; background: #fbfbfd; }
.msg { display: inline-block; clear: both; padding: 10px 14px; border-radius: 14px; margin: 8px 0; line-height: 1.35; max-width: 90%; }
.msg.bot { background: #ffffff; color: #111827; border: 1px solid #f0f1f5; float: left; }
.msg.user { background: #111827; color: #ffffff; float: right; }
.msg.error { background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; float: left; }
.msg .typed { white-space: pre-wrap; }

/* Cursor animation */
.cursor { display: inline-block; margin-left: 2px; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }

/* Picker (choices / slider) */
.gfcrds-picker { display:none; padding: 12px 12px 0 12px; border-top: 1px dashed #eee; background: #fff; }
.gfcrds-picker .choice { margin: 8px 8px 0 0; padding: 8px 12px; border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; cursor: pointer; }
.gfcrds-picker .choice:hover { border-color: #111827; }

/* Slider */
.slider-wrap { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 8px; }
.slider { width: 100%; }
.slider-value { text-align: center; font-weight: 600; }
.mt8 { margin-top: 8px; }

/* Input area: input above the send button and centered */
.gfcrds-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  align-items: stretch;
}

/* Hard reset to defeat theme overrides causing a tiny, left-stacked input */
.gfcrds-input input#gfcrds-question {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 12px 14px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  appearance: none !important;
}

/* Button */
.gfcrds-input button#gfcrds-send {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
}
.gfcrds-input button:disabled,
.gfcrds-input input:disabled { opacity: 0.6; cursor: not-allowed; }

/* Review card */
.review { background: #fff; border: 1px solid #eef0f4; border-radius: 12px; padding: 12px; margin: 10px 12px; }
.review-row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #eef0f4; }
.review-row:last-child { border-bottom: none; }
.review-row .k { color: #6b7280; }
.review-row .v { color: #111827; font-weight: 600; }
.review-actions { display:flex; gap: 10px; margin: 10px 12px 14px; }
.review-actions .primary { background: #111827; color: #fff; border: 1px solid #111827; padding: 10px 14px; border-radius: 10px; cursor:pointer; }
.review-actions .ghost { background: #fff; color: #111827; border: 1px solid #e5e7eb; padding: 10px 14px; border-radius: 10px; cursor:pointer; }

/* Results table */
.gfcrds-results { max-width: 720px; margin: 20px auto; background: #fff; border: 1px solid #eef0f4; border-radius: 12px; padding: 16px; }
.gfcrds-results h2 { margin: 0 0 12px 0; font-size: 20px; }
.gfcrds-summary { width: 100%; border-collapse: collapse; }
.gfcrds-summary th, .gfcrds-summary td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #f3f4f6; }

/* A11y utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
