/* =========================================================
   Paperform Survey UI (student-friendly, high-honesty)
   Based on: low-noise visuals, high readability, low cognitive load,
   calm palette (muted green/teal), clear hierarchy, big tap targets,
   large open-ended boxes, subtle (non-alarming) states.
   Paste into: Paperform → Theme/Design → Custom CSS
   ========================================================= */

/* ---------- Design tokens ---------- */
:root{
  --bg: #f7faf9;                  /* very light neutral w/ slight green tint */
  --surface: #ffffff;             /* question "card" */
  --text: #0f172a;                /* primary text */
  --muted: #475569;               /* secondary text */
  --border: rgba(15, 23, 42, .12);

  --accent: #0f766e;              /* muted teal/green (trust + calm) */
  --accent-soft: rgba(15, 118, 110, .10);
  --accent-soft-2: rgba(15, 118, 110, .16);

  --shadow: 0 10px 28px rgba(2, 6, 23, .06);
  --radius: 18px;

  --focus-ring: 0 0 0 4px var(--accent-soft);
}

/* ---------- Page background + base typography ---------- */
/* Paperform can wrap differently depending on embed/theme; we target a few common wrappers */
body,
.Paperform_Container,
.paperform,
#paperform{
  background: var(--bg) !important;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.Paperform_Container,
.paperform,
#paperform{
  line-height: 1.55;
  font-size: 16px;
}

/* Headings: clear hierarchy, not “corporate” */
.Paperform_Container h1,
.Paperform_Container h2,
.Paperform_Container h3,
.paperform h1,
.paperform h2,
.paperform h3{
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Helper / description text */
.Paperform_Container p,
.Paperform_Container small,
.paperform p,
.paperform small{
  color: var(--muted);
}

/* ---------- Layout / width (reduce scanning effort) ---------- */
.Paperform__Container,
.paperform__container,
.paperform .container{
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 16px 44px !important;
}

/* ---------- Question blocks as calm “cards” (reduces overwhelm) ---------- */
.Paperform__QuestionBlock,
.paperform .question,
.paperform .question-block{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  margin: 0 0 14px 0;
}

/* Optional: slightly reduce the visual weight of cards if you prefer flatter */
.Paperform__QuestionBlock{
  /* box-shadow: 0 6px 18px rgba(2,6,23,.05); */
}

/* ---------- Inputs: big targets, calm focus ring ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select{
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  min-height: 44px;           /* tap-friendly */
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Larger open-ended boxes encourage longer responses */
textarea{
  min-height: 140px;          /* aligns w/ “bigger boxes → longer comments” */
  resize: vertical;
}

/* Focus state: visible but not intense */
input:focus,
textarea:focus,
select:focus{
  outline: none;
  border-color: rgba(15,118,110,.45);
  box-shadow: var(--focus-ring);
}

/* Placeholder text toned down */
::placeholder{
  color: rgba(71, 85, 105, .75);
}

/* ---------- Multiple choice / checkboxes (subtle selection, not “graded”) ---------- */
/* These class names vary by Paperform themes; we include a few common ones */
.Choices__choice,
.choice,
.option,
.paperform .choices label{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  transition: background .15s ease, border-color .15s ease;
}

/* Hover is subtle to avoid “nudging” */
.Choices__choice:hover,
.choice:hover,
.option:hover,
.paperform .choices label:hover{
  background: rgba(15,118,110,.06);
  border-color: rgba(15,118,110,.24);
}

/* Selected state: soft highlight (no bright green “correct answer” vibe) */
.Choices__choice[aria-checked="true"],
.choice.is-selected,
.option.is-selected,
.paperform .choices input:checked + label{
  background: var(--accent-soft);
  border-color: rgba(15,118,110,.50);
}

/* If your theme uses custom radio/checkbox circles, keep them calm */
input[type="radio"],
input[type="checkbox"]{
  accent-color: var(--accent);
}

/* ---------- Buttons (primary = teal, secondary = neutral) ---------- */
button,
.btn,
.btn-raised,
.BtnV2--raised,
.submit button,
button[type="submit"]{
  border-radius: 999px !important;
  min-height: 44px;
  padding: 10px 16px;
}

/* Primary action */
.btn-primary,
.btn-raised.btn-primary,
button[type="submit"],
.submit button{
  background: var(--accent) !important;
  color: #fff !important;
  border: 1px solid rgba(15,118,110,.30) !important;
  box-shadow: 0 10px 22px rgba(15,118,110,.18) !important;
  transition: filter .15s ease, box-shadow .15s ease, transform .02s ease;
}

.btn-primary:hover,
.btn-raised.btn-primary:hover,
button[type="submit"]:hover,
.submit button:hover{
  filter: brightness(1.03);
  box-shadow: 0 12px 26px rgba(15,118,110,.22) !important;
}

.btn-primary:active,
.btn-raised.btn-primary:active,
button[type="submit"]:active,
.submit button:active{
  transform: translateY(1px);
}

/* Secondary/back buttons */
.btn-secondary,
.Pagination__btn--previous,
.GuidedModeInstructions__button--back{
  background: #fff !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

/* ---------- Error states: visible but not “panic red” ---------- */
.LiveField__error,
.error,
.paperform .error-message{
  color: #9a3412; /* muted orange-brown */
  background: rgba(154, 52, 18, .08);
  border: 1px solid rgba(154, 52, 18, .18);
  padding: 10px 12px;
  border-radius: 14px;
  margin-top: 8px;
}

/* ---------- Progress (style only; keep it accurate in settings if using skip logic) ---------- */
.ProgressBar__bar,
.progress-bar,
.paperform .progressbar{
  height: 8px;
  border-radius: 999px;
  background: rgba(15,118,110,.12);
  overflow: hidden;
}

.ProgressBar__barFill,
.progress-bar .fill,
.paperform .progressbar .bar{
  background: rgba(15,118,110,.55);
  border-radius: 999px;
}

/* ---------- Reduce visual clutter from dividers ---------- */
hr,
.Paperform_Container .divider{
  border: none;
  height: 1px;
  background: rgba(15, 23, 42, .10);
  margin: 18px 0;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 520px){
  .Paperform__Container,
  .paperform__container,
  .paperform .container{
    padding: 18px 12px 32px !important;
  }

  .Paperform__QuestionBlock,
  .paperform .question,
  .paperform .question-block{
    padding: 18px 14px;
    border-radius: 16px;
  }

  textarea{
    min-height: 160px; /* mobile typing comfort */
  }
}
