/* Look copied from Junaid's Typeform theme "Classic blue" (rendererData.theme on its public page):
   system font, question #000000, answer + button #0445AF, background #FFFFFF, small rounded corners,
   welcome/ending centered, questions left aligned. */
:root {
  --question: #000000;
  --answer: #0445af;
  --button: #0445af;
  --button-text: #ffffff;
  --background: #ffffff;
  --answer-soft: rgba(4, 69, 175, 0.1);
  --answer-line: rgba(4, 69, 175, 0.6);
  --error: #af0404;
  --radius: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--background); color: var(--question); font-family: var(--font); }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.loading { text-align: center; color: #555; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: var(--answer-soft); z-index: 2; }
.progress-fill { height: 100%; width: 0; background: var(--answer); transition: width 0.3s ease; }

.screen { animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .progress-fill { transition: none; } }

.center { text-align: center; }
.center .actions { justify-content: center; }

.welcome-img { display: block; max-width: 100%; max-height: 40vh; margin: 0 auto 24px; border-radius: var(--radius); }

h1, h2 { font-weight: 400; line-height: 1.35; margin: 0 0 12px; white-space: pre-line; }
h1 { font-size: clamp(20px, 5vw, 28px); }
h2 { font-size: clamp(20px, 4.6vw, 24px); display: flex; gap: 8px; }
.qnum { color: var(--answer); font-size: 16px; padding-top: 5px; white-space: nowrap; }
.desc { font-size: clamp(16px, 4vw, 20px); color: rgba(0, 0, 0, 0.7); line-height: 1.4; margin: 0 0 24px; white-space: pre-line; }
.center .desc { font-size: 16px; }
.req { color: var(--question); }

.field { display: block; margin: 0 0 24px; }
.field-label { display: block; font-size: 16px; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--answer-line);
  background: transparent;
  color: var(--answer);
  font: inherit;
  font-size: clamp(20px, 5vw, 26px);
  padding: 6px 0 8px;
  outline: none;
  border-radius: 0;
}
input:focus, textarea:focus { border-bottom: 2px solid var(--answer); padding-bottom: 7px; }
input::placeholder, textarea::placeholder { color: var(--answer-line); }
textarea { resize: vertical; min-height: 48px; }

.phone-row { display: flex; gap: 12px; align-items: flex-end; }
.phone-row select {
  flex: 0 0 auto;
  max-width: 45%;
  font: inherit;
  font-size: 16px;
  color: var(--answer);
  background: var(--answer-soft);
  border: 1px solid var(--answer-line);
  border-radius: var(--radius);
  padding: 8px 6px;
}

.choices { display: flex; flex-direction: column; gap: 8px; max-width: 100%; width: fit-content; min-width: min(100%, 320px); }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font: inherit;
  font-size: clamp(16px, 4vw, 20px);
  color: var(--answer);
  background: var(--answer-soft);
  border: 1px solid var(--answer-line);
  border-radius: var(--radius);
  padding: 8px 12px 8px 8px;
  cursor: pointer;
  min-height: 44px;
}
.choice:hover { background: rgba(4, 69, 175, 0.2); }
.choice:focus-visible, .btn:focus-visible, .back:focus-visible, a.btn:focus-visible { outline: 3px solid var(--answer); outline-offset: 2px; }
.choice[aria-checked="true"] { border: 2px solid var(--answer); padding: 7px 11px 7px 7px; }
.key {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--background);
  border: 1px solid var(--answer-line);
  border-radius: 2px;
}
.choice[aria-checked="true"] .key { background: var(--answer); color: var(--button-text); }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn, a.btn {
  font: inherit;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  color: var(--button-text);
  background: var(--button);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { filter: brightness(1.15); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.hint { font-size: 12px; color: rgba(0, 0, 0, 0.6); }
.back { font: inherit; font-size: 14px; color: var(--answer); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; }

.error { color: var(--error); background: rgba(175, 4, 4, 0.08); border-radius: var(--radius); padding: 6px 10px; font-size: 14px; margin: 8px 0 0; display: inline-block; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
