/* Theme for the Efeqta form on efeqta.com: the look of the site's own .contact-form.
   Paste into the site's CSS (any place: the form's stylesheet has specificity 0 and always loses).
   Uses the site's variables: --text-dark, --black, --white, --accent, --secondary, --text-s, --text-m,
   --space-m, --focus-width, --focus-color, --focus-offset. */

.efrm {
  --efrm-color-text: var(--text-dark);
  --efrm-color-label: var(--black);
  --efrm-label-weight: 300;
  --efrm-label-gap: 0.4rem;
  --efrm-line-height: 1.4;
  --efrm-gap: 0.875rem;

  /* fields: flat, grey, square, light type */
  --efrm-color-control-bg: color-mix(in srgb, var(--black) 4.5%, var(--white));
  --efrm-color-control-text: var(--text-dark);
  --efrm-color-placeholder: color-mix(in srgb, var(--black) 35%, var(--white));
  --efrm-border-width: 0px;
  --efrm-radius: 0;
  --efrm-control-padding: 0.8125rem;
  --efrm-focus-ring: var(--focus-width) solid var(--focus-color);
  --efrm-focus-offset: var(--focus-offset);

  /* required star and errors */
  --efrm-color-required: var(--accent);
  --efrm-color-error: var(--accent);

  /* the submit button has class "button" and data-variant="accent": the site styles it */
  --efrm-color-accent: var(--accent);
}

.efrm .efrm-control {
  font-size: var(--text-s);
  font-weight: 300;
}
.efrm textarea.efrm-control {
  min-block-size: 13.5em;
}
.efrm .efrm-required {
  font-weight: 700;
}

/* "Ich interessiere mich für:" and the consent line: the site's own checkboxes */
.efrm .efrm-col[data-field="interest"] {
  padding-block-end: 1.225rem;
}
.efrm .efrm-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 0.625rem;
}
.efrm .efrm-group > legend {
  flex: 0 0 100%;
  font-size: 0.875rem;
  margin-block-end: 0;
}
.efrm .efrm-choice {
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-size: var(--text-m);
  font-weight: 300;
  color: var(--base);
  cursor: pointer;
}
.efrm .efrm-col[data-field="consent"] .efrm-choice {
  margin-block: 0.34375rem 0.625rem;
}
.efrm .efrm-choice input {
  appearance: none;
  flex: 0 0 auto;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  margin: 0;
  border: 0;
  border-radius: 0.25rem;
  background-color: color-mix(in srgb, var(--black) 4.5%, var(--white));
  cursor: pointer;
}
.efrm .efrm-choice input:checked {
  background-color: var(--accent);
}
.efrm .efrm-choice input:checked::after {
  content: "";
  display: block;
  inline-size: 0.375rem;
  block-size: 0.6875rem;
  margin: 0.125rem auto 0;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.efrm .efrm-submit {
  margin-block-start: 0.875rem;
}

/* Thank-you message (public pages strip classes, so it is styled by structure) */
.efrm-thanks > div {
  display: grid;
  gap: var(--space-s);
  margin-block: var(--space-m);
  padding: var(--space-m);
  background: color-mix(in srgb, var(--black) 4.5%, var(--white));
}
.efrm-thanks > div > * {
  margin: 0;
}
/* "Nachricht gesendet" */
.efrm-thanks > div > p:first-child {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.efrm-thanks h3 {
  font-weight: 200;
  line-height: 1.2;
  color: var(--accent);
}
/* "Ihr Team von Efeqta" */
.efrm-thanks > div > p:last-child {
  margin-top: var(--space-xs);
}
