/* The checkout now has two steps; use all available space on narrow screens. */
@media (max-width: 780px) {
  body .sm-purchase-steps,
  body.sm-commerce.woocommerce-checkout .sm-purchase-steps {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    font-size: 14px;
    line-height: 1.4;
  }
  body .sm-purchase-steps .sm-purchase-step,
  body.sm-commerce.woocommerce-checkout .sm-purchase-step {
    gap: 7px;
    min-height: 44px;
  }
  body.sm-commerce .sm-purchase-steps [aria-current] {
    color: var(--sm-ui-action, #37782f);
  }
  body.sm-commerce .sm-purchase-steps [aria-current] b {
    background: var(--sm-ui-action, #37782f);
    border-color: var(--sm-ui-action, #37782f);
  }

  /* Keep consent settings available below the footer without covering form fields. */
  #cmplz-manage-consent {
    text-align: center;
    background: #111;
  }
  #cmplz-manage-consent .cmplz-manage-consent {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: calc(100% - 32px) !important;
    min-height: 44px !important;
    margin: 16px auto !important;
    padding: 10px 16px !important;
    border: 1px solid #777 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  body.woocommerce-checkout .woocommerce-account-fields label.checkbox,
  body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label.checkbox {
    display: block;
    min-height: 44px;
    line-height: 1.5;
    cursor: pointer;
  }
  body.woocommerce-checkout .woocommerce-account-fields input[type="checkbox"],
  body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 3px 8px 3px 0;
    vertical-align: middle;
    accent-color: var(--sm-ui-action, #37782f);
  }

  /* The courier's fixed number-field width must fit its grid column. */
  body.sm-commerce.woocommerce-checkout .sm-courier-first #billing_street_number_field {
    width: auto !important;
    min-width: 0;
  }
}

@media (max-width: 359px) {
  body.sm-commerce.woocommerce-checkout .sm-courier-first #billing_street_field {
    grid-column: span 8;
  }
  body.sm-commerce.woocommerce-checkout .sm-courier-first #billing_street_number_field {
    grid-column: span 4;
  }
}
