/**
 * HebOffice forms (course registration / contact)
 * Colours follow the site design: red #a8282a, orange #f19a1e
 */
.hmheboffice-form {
  --hmho-red: #a8282a;
  --hmho-red-dark: #86181a;
  --hmho-orange: #f19a1e;
  --hmho-card: #fdf8f0;
  --hmho-border: #d9cfc2;
  --hmho-text: #333;
  max-width: 46em;
  color: var(--hmho-text);
}

/* Intro / back link */
.hmheboffice-form .hmheboffice-back { margin: 0 0 .8em; }
.hmheboffice-form .hmheboffice-back a { text-decoration: none; font-weight: bold; }
.hmheboffice-form .hmheboffice-back a::before { content: "\2190\00a0"; }
.hmheboffice-form .hmheboffice-back + hr { display: none; }
.hmheboffice-registration > h4,
.hmheboffice-contact .contact-intro {
  margin: 0 0 1.4em;
  padding: .9em 1.1em;
  background: #fff;
  border: 1px solid var(--hmho-border);
  border-left: 4px solid var(--hmho-red);
  border-radius: 6px;
  font-size: 1.05em;
  line-height: 1.45;
}
.hmheboffice-contact .contact-intro h3 { font-size: 1em; font-weight: normal; color: inherit; margin: 0 0 .6em; }
.hmheboffice-contact .contact-intro p { margin: 0 0 .6em; }
.hmheboffice-form .contact-phone { font-size: 1.35em; color: var(--hmho-red); line-height: 1.35; }

/* Sections as cards */
.hmheboffice-form fieldset.hmheboffice-fieldset {
  margin: 0 0 1.4em;
  padding: 1.1em 1.2em .4em;
  background: var(--hmho-card);
  border: 1px solid var(--hmho-border);
  border-top: 4px solid var(--hmho-orange);
  border-radius: 6px;
}
.hmheboffice-form fieldset.hmheboffice-fieldset > legend {
  float: left; /* keeps the legend inside the card */
  width: 100%;
  margin: 0 0 .9em;
  padding: 0;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--hmho-red);
}
.hmheboffice-form .hmho-grid { clear: both; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.2em; }
.hmheboffice-form .hmho-grid > .hmho-full { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .hmheboffice-form .hmho-grid { grid-template-columns: 1fr; }
  .hmheboffice-form fieldset.hmheboffice-fieldset { padding: .9em .8em .2em; }
}

/* Fields */
.hmheboffice-form .control-group { margin: 0 0 .9em; min-width: 0; }
.hmheboffice-form .control-label label { display: block; margin: 0 0 .3em; font-weight: bold; }
.hmheboffice-form .star { color: var(--hmho-red); }
.hmheboffice-form input[type="text"],
.hmheboffice-form input[type="email"],
.hmheboffice-form input[type="tel"],
.hmheboffice-form textarea {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: .55em .7em;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--hmho-border);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
  transition: border-color .15s, box-shadow .15s;
}
.hmheboffice-form textarea { min-height: 7em; resize: vertical; }
.hmheboffice-form input::placeholder { color: #a39a8f; }
.hmheboffice-form input:focus,
.hmheboffice-form textarea:focus {
  outline: 0;
  border-color: var(--hmho-orange);
  box-shadow: 0 0 0 3px rgba(241, 154, 30, .25);
}

/* Calendar: input + icon button */
.hmheboffice-form .field-calendar .input-group { display: flex; }
.hmheboffice-form .field-calendar input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hmheboffice-form .field-calendar .input-group > button {
  flex: 0 0 2.8em;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: var(--hmho-red) no-repeat center / 1.2em url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  border: 1px solid var(--hmho-red);
  border-radius: 0 4px 4px 0;
}
.hmheboffice-form .field-calendar .input-group > button:hover,
.hmheboffice-form .field-calendar .input-group > button:focus { background-color: var(--hmho-orange); border-color: var(--hmho-orange); }
.hmheboffice-form .visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* Selected course: summary instead of grey inputs */
.hmheboffice-fieldset-course { background: #fff !important; border-top-color: var(--hmho-red) !important; }
.hmheboffice-fieldset-course .hmho-grid { grid-template-columns: 1fr 1fr; }
.hmheboffice-fieldset-course .control-group { margin-bottom: .7em; }
.hmheboffice-fieldset-course .control-label label { font-weight: normal; font-size: .9em; color: #777; margin: 0; }
.hmheboffice-form .hmheboffice-fieldset-course input[readonly] {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-weight: bold;
  font-size: 1.05em;
}

/* Consent checkboxes */
.hmheboffice-fieldset-consent .control-group { margin-bottom: .8em; }
.hmheboffice-fieldset-consent .control-label label { margin: 0; font-weight: normal; line-height: 1.45; cursor: pointer; }
.hmheboffice-fieldset-consent .form-check { margin: 0; }
.hmheboffice-form input[type="checkbox"] {
  width: 1.25em;
  height: 1.25em;
  margin: .1em 0 0;
  accent-color: var(--hmho-red);
  cursor: pointer;
}

/* Honeypot */
.hmho-hp-wrap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Submit */
.hmheboffice-required-hint { margin: 0 0 1em; color: #777; }
.hmheboffice-form .hmho-submit {
  display: inline-block;
  padding: .75em 2.2em;
  font: inherit;
  font-weight: bold;
  font-size: 1.05em;
  color: #fff;
  background: var(--hmho-red);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .15s;
}
.hmheboffice-form .hmho-submit:hover,
.hmheboffice-form .hmho-submit:focus { background: var(--hmho-orange); outline: 0; }
@media (max-width: 600px) { .hmheboffice-form .hmho-submit { width: 100%; } }

/* Validation */
.hmheboffice-form input.invalid,
.hmheboffice-form textarea.invalid { border-color: #c00; box-shadow: 0 0 0 3px rgba(204, 0, 0, .12); }
.hmheboffice-form label.invalid { color: #c00; }
.hmheboffice-form .form-control-feedback { display: block; margin-top: .25em; color: #c00; font-size: .9em; }

/* Thank-you page */
.hmheboffice-complete {
  padding: 1.2em 1.4em;
  background: var(--hmho-card);
  border: 1px solid var(--hmho-border);
  border-left: 4px solid var(--hmho-orange);
  border-radius: 6px;
}
.hmheboffice-complete p:last-child { margin-bottom: 0; }

/* Field hints (former Proforms help texts): shown above the input with a "?" icon */
.hmheboffice-form .controls { display: flex; flex-direction: column; }
.hmheboffice-form .controls > [id$="-desc"] { order: -1; margin: 0 0 .4em; }
.hmheboffice-form .controls > [id$="-desc"] .form-text {
  display: block;
  position: relative;
  padding-left: 1.7em;
  font-size: .95em;
  line-height: 1.45;
  color: #555;
}
.hmheboffice-form .controls > [id$="-desc"] .form-text::before {
  content: "?";
  position: absolute;
  left: 0;
  top: .1em;
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  background: var(--hmho-red);
  color: #fff;
  font-weight: bold;
  font-size: .85em;
  line-height: 1.25em;
  text-align: center;
}

/* Consent checkboxes: checkbox | label, hint below the label */
.hmheboffice-fieldset-consent .control-group {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .7em;
  align-items: start;
}
.hmheboffice-fieldset-consent .controls { display: contents; }
.hmheboffice-fieldset-consent .controls > .form-check { grid-column: 1; grid-row: 1; }
.hmheboffice-fieldset-consent .control-label { grid-column: 2; grid-row: 1; }
.hmheboffice-fieldset-consent .controls > [id$="-desc"] { grid-column: 2; grid-row: 2; order: 0; margin: .2em 0 0; }

/* Buttons: submit + reset */
.hmheboffice-actions { display: flex; flex-wrap: wrap; gap: .8em; align-items: center; }
.hmheboffice-form .hmho-reset {
  padding: .75em 1.6em;
  font: inherit;
  color: var(--hmho-red);
  background: #fff;
  border: 1px solid var(--hmho-border);
  border-radius: 4px;
  cursor: pointer;
}
.hmheboffice-form .hmho-reset:hover,
.hmheboffice-form .hmho-reset:focus { border-color: var(--hmho-orange); color: var(--hmho-red-dark); outline: 0; }
@media (max-width: 600px) { .hmheboffice-form .hmho-reset { width: 100%; } }

/* Embedded as iframe on www.geburtshaus-bremen.de (tmpl=component): use the full width */
.tmpl-component .hmheboffice-form { max-width: none; }

/* Calendar popup: footer buttons (Leeren / Heute / Schließen) as plain text buttons */
.hmheboffice-form .js-calendar .buttons-wrapper { display: flex; gap: .4em; padding: .4em; }
.hmheboffice-form .js-calendar .buttons-wrapper button {
  flex: 1 1 auto;
  margin: 0;
  padding: .45em .6em;
  font: inherit;
  font-size: .9em;
  color: var(--hmho-red);
  background: #fff;
  background-image: none;
  border: 1px solid var(--hmho-border);
  border-radius: 4px;
  cursor: pointer;
}
.hmheboffice-form .js-calendar .buttons-wrapper button:hover,
.hmheboffice-form .js-calendar .buttons-wrapper button:focus { color: #fff; background: var(--hmho-red); border-color: var(--hmho-red); outline: 0; }
.hmheboffice-form .js-calendar .day.selected,
.hmheboffice-form .js-calendar .day:hover { background: var(--hmho-orange); color: #fff; }
.hmheboffice-form .js-calendar a { text-decoration: none; }
