/* checkoutdelivery: clearer forms (setting "Improve checkout form design").
   Loaded on the checkout page and on the login, registration and password reset pages,
   so the customer sees the same fields everywhere. */

:is(body#checkout, body#authentication, body#registration, body#password) .form-control {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #c9ced6;
  border-radius: 8px;
  background-color: #fff;
  color: #1f2328;
  font-size: 16px; /* 16px or more: iPhones do not zoom in when the field is focused */
  line-height: 1.4;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

:is(body#checkout, body#authentication, body#registration, body#password) textarea.form-control {
  min-height: 96px;
}

:is(body#checkout, body#authentication, body#registration, body#password) .form-control::placeholder {
  color: #9aa1aa;
}

:is(body#checkout, body#authentication, body#registration, body#password) .form-control:focus {
  border-color: #13a14f;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(19, 161, 79, 0.18);
  outline: 0;
}

:is(body#checkout, body#authentication, body#registration, body#password) .has-error .form-control,
:is(body#checkout, body#authentication, body#registration, body#password) .form-control.is-invalid {
  border-color: #d92d20;
}

:is(body#checkout, body#authentication, body#registration, body#password) .has-error .form-control:focus {
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.15);
}

/* field errors: short red text under the field instead of a large pink box */
:is(body#checkout, body#authentication, body#registration, body#password) .form-group .help-block ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

:is(body#checkout, body#authentication, body#registration, body#password) .form-group .help-block li,
:is(body#checkout, body#authentication, body#registration, body#password) .form-group .help-block .alert {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #d92d20;
  font-size: 13px;
  line-height: 1.4;
}

/* password field with the show/hide button */
:is(body#checkout, body#authentication, body#registration, body#password) .input-group .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

:is(body#checkout, body#authentication, body#registration, body#password) .input-group-btn .btn,
:is(body#checkout, body#authentication, body#registration, body#password) .input-group-append .btn {
  min-height: 48px;
  border: 1px solid #c9ced6;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #fff;
  box-shadow: none;
  /* themes give this button white text on a grey background */
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
}

:is(body#checkout, body#authentication, body#registration, body#password) .form-group > label,
:is(body#checkout, body#authentication, body#registration, body#password) .form-control-label,
:is(body#checkout, body#authentication, body#registration, body#password) .col-form-label {
  color: #1f2328;
  font-size: 14px;
  font-weight: 600;
}

body#checkout .checkout-step .btn-lg.continue,
body#checkout #payment-confirmation .btn,
:is(body#authentication, body#registration, body#password) .form-footer .btn,
:is(body#authentication, body#registration, body#password) .form-control-submit {
  min-height: 52px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
}

/* phones: label above the field, compact spacing */
@media (max-width: 767px) {
  :is(body#checkout, body#authentication, body#registration, body#password) .form-group {
    margin-bottom: 14px;
  }

  :is(body#checkout, body#authentication, body#registration, body#password) .form-group.row > label,
  :is(body#checkout, body#authentication, body#registration, body#password) .form-group.row > .form-control-label,
  :is(body#checkout, body#authentication, body#registration, body#password) .form-group.row > .col-form-label {
    flex: 0 0 100%;
    max-width: 100%;
    padding-top: 0;
    padding-bottom: 6px;
    line-height: 1.3;
    text-align: left;
  }

  :is(body#checkout, body#authentication, body#registration, body#password) .form-group.row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  :is(body#checkout, body#authentication, body#registration, body#password) .form-control-comment {
    min-height: 0;
    padding-top: 4px;
    color: #6b7280;
    font-size: 12px;
    text-align: left;
  }

  :is(body#checkout, body#authentication, body#registration, body#password) .form-control-comment:empty {
    display: none;
  }

  /* login and registration: the main button over the full width, as in the checkout */
  :is(body#authentication, body#registration) .form-footer .btn {
    display: block;
    float: none !important;
    width: 100%;
  }

  body#checkout .checkout-step .step-title {
    font-size: 16px;
  }
}
