/* Form and confirmation pages: geometry and colors measured from the Google Forms original. */
html { -webkit-text-size-adjust: 100%; }
body.form-page {
  margin: 0;
  background-color: var(--page-bg);
  color: #1f1f1f;
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}
.page { width: 640px; max-width: 90vw; margin: 0 auto; padding: 12px 0 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.page form { margin: 0; }

.card {
  position: relative;
  background-color: #fff;
  border: 1px solid #dadada;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 24px;
}
.header-card { padding: 22px 24px 16px; }
.header-bar {
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 10px;
  background-color: var(--theme);
  border-radius: 8px 8px 0 0;
}
.form-title { font-size: 32px; line-height: 1.35; padding-bottom: 12px; overflow-wrap: anywhere; }
/* Form page: title on the left, a Sheet link on the right (same look as the sheet page's Form link). */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.title-row .form-title { padding-bottom: 0; }
.title-link { flex: none; margin-right: -12px; padding: 6px 12px; border-radius: 16px;
  font-family: FormSans, Roboto, Arial, sans-serif; font-size: 14px; font-weight: 500; line-height: 20px;
  color: var(--theme); text-decoration: none; }
.title-link:hover { background-color: color-mix(in srgb, var(--theme) 6%, transparent); }

.q-title { font-size: 16px; line-height: 24px; margin-bottom: 16px; overflow-wrap: anywhere; }
.answer { padding-bottom: 8px; }
.answer.short { width: 50%; }
@media (max-width: 659px) { .answer.short { width: 100%; } }

.field { position: relative; padding-top: 14px; }
.answer.short .field { padding-bottom: 2px; }
.field input, .field textarea, .other-field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #1f1f1f;
  font-family: Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field input { height: 24px; }
.field textarea { height: 24px; min-height: 24px; padding: 1px 0 3px; resize: none; overflow: hidden; }
.field input::placeholder, .field textarea::placeholder { color: #757575; opacity: 1; }
.field .line, .field .focus { position: absolute; left: 0; right: 0; }
.field .line { bottom: 0; height: 1px; background-color: rgba(0, 0, 0, .12); }
.answer.para .field .line { bottom: -1px; }
.field .focus, .other-field .focus {
  bottom: 0;
  height: 2px;
  background-color: var(--theme);
  transform: scaleX(0);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.answer.para .field .focus { bottom: -1px; }
.field:focus-within .focus, .other-field:focus-within .focus { transform: scaleX(1); }

.choice { display: flex; align-items: center; height: 24px; padding: 8px 8px 8px 0; cursor: pointer; }
.choice input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.radio {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid #5f6368;
  border-radius: 50%;
  transition: border-color .2s;
}
.radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background-color: var(--theme);
  transform: scale(0);
  transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}
.radio::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background-color: var(--theme);
  opacity: 0;
  transition: opacity .15s;
}
input:checked + .radio { border-color: var(--theme); }
input:checked + .radio::after { transform: scale(1); }
input:focus-visible + .radio::before { opacity: .12; }
@media (hover: hover) { .choice:hover .radio::before { opacity: .04; } }
.choice-label { margin-left: 12px; font-size: 14.6667px; line-height: 20px; overflow-wrap: anywhere; }

.choice.other { height: 26px; cursor: default; }
.other-label { display: flex; align-items: center; height: 26px; padding-right: 20px; cursor: pointer; }
.other-field { position: relative; flex: 1; min-width: 0; height: 26px; }
.other-field input { height: 23px; padding: 2px 0; color: #000; }
.other-field .line { height: 1px; background-color: rgba(0, 0, 0, .12); }
.other-field .focus { position: relative; display: block; bottom: auto; }

.buttons { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 12px; padding-bottom: 10px; }
.btn-submit, .btn-clear, .gm-dialog button {
  box-sizing: border-box;
  height: 38px;
  margin: 0;
  border-radius: 4px;
  font-family: FormSans, Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .25px;
  line-height: 36px;
  font-kerning: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.btn-submit {
  display: inline-flex;
  align-items: flex-start; /* label stays in the top 36px when the button is taller (touch) */
  padding: 0 24px;
  border: 1px solid #dadada;
  background-color: var(--theme);
  color: #fff;
  transition: box-shadow .2s;
}
.btn-submit:hover { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15); }
.btn-submit:disabled { opacity: .7; cursor: default; }
.btn-clear, .gm-dialog button { padding: 0 8px; border: 0; background: transparent; color: var(--theme); }
.btn-clear:hover, .gm-dialog button:hover { background-color: color-mix(in srgb, var(--theme) 4%, transparent); }
@media (pointer: coarse) {
  .btn-submit, .btn-clear { height: 48px; }
  .btn-clear { line-height: 48px; }
}

.confirm { padding-bottom: 24px; }
.confirm-msg { font-size: 14px; line-height: 20px; letter-spacing: .2px; }
.confirm-links { margin-top: 16px; font-size: 14px; line-height: 20px; letter-spacing: .2px; }
.confirm-links a { display: table; color: #0b57d0; text-decoration: underline; }
.confirm-links a + a { margin-top: 16px; }

.gm-dialog {
  box-sizing: border-box;
  width: min(400px, 90vw);
  border: 0;
  border-radius: 28px;
  padding: 24px;
  background-color: #fff;
  color: #1f1f1f;
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .3);
}
.gm-dialog::backdrop { background-color: rgba(0, 0, 0, .32); }
.gm-dialog form { margin: 0; }
.gm-dialog h2 { margin: 0 0 16px; font-family: FormSans, Roboto, Arial, sans-serif; font-size: 24px; font-weight: 400; line-height: 32px; }
.gm-dialog p { margin: 0; font-size: 14px; line-height: 20px; letter-spacing: .2px; color: #444746; }
.gm-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.gm-dialog button { padding: 0 12px; border-radius: 20px; height: 40px; line-height: 40px; }
.gm-dialog button:focus-visible { outline: none; background-color: color-mix(in srgb, var(--theme) 12%, transparent); }

/* Sign-in and set-password cards: the form's title card plus one field. */
.auth { padding-bottom: 24px; }
.auth .form-title { padding-bottom: 8px; }
.auth-note { font-size: 14px; line-height: 20px; letter-spacing: .2px; margin-bottom: 4px; }
.auth .answer { padding-bottom: 0; }
.auth-error { margin-top: 8px; color: #d93025; font-size: 12px; line-height: 16px; letter-spacing: .3px; }
.auth-actions { margin-top: 24px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
