/* Shared text fields for the MobilHybrid WordPress forms. */
:is(.mhroi-shell, .mhc-shell, .mhrf-shell, .mhcf-wrap) {
  --mh-field-radius: 14px;
  --mh-field-border: #87947f;
  --mh-field-focus: #436d2d;
}

:is(.mhroi-shell .mhroi-form .mhroi-field, .mhc-shell .mhc-form label,
  .mhc-shell .mhc-request-form label, .mhrf-shell .mhrf-form label, .mhcf-wrap .mhcf-form .mhcf-label)
  > :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--mh-field-border);
  border-radius: var(--mh-field-radius);
  background-color: #fff;
  color: #182015;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

:is(.mhroi-shell .mhroi-form .mhroi-field, .mhc-shell .mhc-form label,
  .mhc-shell .mhc-request-form label, .mhrf-shell .mhrf-form label, .mhcf-wrap .mhcf-form .mhcf-label)
  > :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select) {
  min-height: 48px;
}

:is(.mhroi-shell .mhroi-form .mhroi-field, .mhc-shell .mhc-form label) > select {
  appearance: none;
  padding-inline-end: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23436d2d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 13px center;
  background-repeat: no-repeat;
}

:is(.mhroi-shell .mhroi-form .mhroi-field, .mhc-shell .mhc-form label,
  .mhc-shell .mhc-request-form label, .mhrf-shell .mhrf-form label, .mhcf-wrap .mhcf-form .mhcf-label)
  > :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea):focus-visible {
  outline: 2px solid var(--mh-field-focus);
  outline-offset: 2px;
}

:is(.mhroi-shell .mhroi-form .mhroi-field, .mhc-shell .mhc-form label,
  .mhc-shell .mhc-request-form label, .mhrf-shell .mhrf-form label, .mhcf-wrap .mhcf-form .mhcf-label)
  > .is-invalid {
  border-color: #b42318;
}

:is(.mhroi-form, .mhc-form) .mh-form-practice-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: fit-content;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

:is(.mhroi-form, .mhc-form) .mh-form-practice-toggle > input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--mh-field-focus);
}

:is(.mhroi-form, .mhc-form) [data-role="practice-panel"]:not([hidden]) {
  display: grid;
  gap: 16px;
  min-width: 0;
}

:is(.mhroi-form, .mhc-form) [data-role="practice-panel"] > p {
  margin: 0;
  line-height: 1.5;
}

:is(.mhroi-form, .mhc-form) [data-role="practice-example"] {
  justify-self: start;
  max-width: 100%;
  min-height: 48px;
  padding-block: 10px;
  white-space: normal;
}

:is(.mhroi-form, .mhc-form) :is([data-role="practice-error"], [data-role="idle-error"], [data-role="energy-error"]):not([hidden]) {
  margin: 0;
  color: #8a2430;
  font-size: 14px;
  line-height: 1.5;
}

.mhroi-step[data-step="2"].mh-practice-active > .mhroi-slider-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 560px) {
  :is(.mhroi-form, .mhc-form) [data-role="practice-example"] {
    justify-self: stretch;
    width: 100%;
  }
}

@media (forced-colors: active) {
  :is(.mhroi-shell .mhroi-form .mhroi-field, .mhc-shell .mhc-form label) > select {
    appearance: auto;
    background-image: none;
  }
}

/* Keep the form and result panels within the calculator on narrow embeds. */
@container (max-width: 960px) {
  .mhc-shell .mhc-grid,
  .mhc-shell .mhc-request-grid,
  .mhc-grid > .mhc-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
