/*
  IONTMAX checkout step fallback overrides
  v20 – more compact Step 2 form rhythm; desktop controls max 600px
*/

@media (max-width: 991px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .content-inner:has(#order-form.sending-order),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order {
    gap: 10px !important;
  }

  /* Karty = často fieldset.box.box-sm.co-box – Shoptet .box padding pryč */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order > .co-box,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-box,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order fieldset.box,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order fieldset.box-sm,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .box.box-sm,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container {
    margin: 0 0 10px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-box h4,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-box h2,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order fieldset.box > h4,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order fieldset.box > legend,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container h4,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container h4 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 16px !important;
  }

  /* Vnitřní fieldsety uvnitř karty – žádný vlastní padding (ne MeHub karta) */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-box fieldset.box:not(.mehub-bonus-checkout-container):not(.rehub-bonus-checkout-container),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-box > fieldset:not(.mehub-bonus-checkout-container):not(.rehub-bonus-checkout-container) {
    margin: 0 !important;
    padding: 0 !important;
    gap: 12px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Login – Osobní údaje */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-co-login-wrap,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information > .form-group:has(a.btn),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information fieldset.box > .form-group:has(a.btn),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information > a.btn,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information fieldset.box > a.btn:first-child {
    margin: 0 0 10px !important;
    padding: 0 0 10px !important;
    border: 0 !important;
    border-bottom: 1px solid #ececec !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-co-login-wrap a.btn,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information fieldset.box .form-group:has(a.btn) a.btn,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information > a.btn,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information fieldset.box > a.btn {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 16px !important;
    min-height: 44px !important;
    height: 44px !important;
    border: 0 !important;
    border-radius: 10px !important;
  }

  /* Mezery mezi Jméno / E-mail / Telefon */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information fieldset.box > .inline-form-fields,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .inline-form-fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Step 2 mobile reset – only real text/select field groups.
     Checkbox rows and conditional wrappers are intentionally untouched. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .smart-label-wrapper.form-group--inline {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Bonus – keep card chrome; only reset bootstrap grid gutters */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order fieldset.mehub-bonus-checkout-container,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order fieldset.rehub-bonus-checkout-container,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container.box,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container.box {
    margin: 0 0 10px !important;
    padding: 12px 14px !important;
    border: 1px solid #ececec !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container .row,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container .row,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container [class*="col-"],
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container [class*="col-"],
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order [class*="ellity-"] .row,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order [class*="ellity-"] [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container .btn,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .mehub-bonus-checkout-container button,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container .btn,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .rehub-bonus-checkout-container button {
    min-height: 44px !important;
    height: 44px !important;
  }

  body.ordering-process.in-krok-2:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #checkoutSidebar .next-step,
  body.ordering-process.in-krok-3:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #checkoutSidebar .next-step {
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 120 !important;
  }
}

/* ============================================================
   STEP 2 – FORM RHYTHM
   Visual/layout only. Does NOT control checkbox state, visibility,
   native Shoptet unveil logic, values, validation or JS behavior.
   ============================================================ */

/* Neutralize only spacing on conditional field containers.
   Their display/visibility remains owned by the runtime. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block {
  gap: 0 !important;
}

/* One field = label -> 3px -> control -> 11px -> next label.
   These selectors intentionally match only smart-label input/select rows. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .smart-label-wrapper.form-group--inline,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .smart-label-wrapper.form-group--inline {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 11px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Labels always sit above their own control. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > label,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .smart-label-wrapper.form-group--inline > label:not(.whole-width),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > label:not(.whole-width),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline > label:not(.whole-width),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline > p.label,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .smart-label-wrapper.form-group--inline > label:not(.whole-width) {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  order: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 3px !important;
  padding: 0 !important;
  transform: none !important;
  background: transparent !important;
  line-height: 1.35 !important;
  pointer-events: auto !important;
}

/* The control wrapper is always immediately below the label. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > .form-control-wrapper,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .smart-label-wrapper.form-group--inline > .form-control-wrapper {
  position: relative !important;
  order: 2 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Personal data: exact vertical rhythm for Name / E-mail / Phone. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group {
  margin-bottom: 11px !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group:last-of-type {
  margin-bottom: 0 !important;
}

/* Billing fields keep the same rhythm. The country dropdown gets the
   requested additional breathing room underneath. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .im-billing-country-group {
  gap: 0 !important;
  margin-bottom: 24px !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .im-billing-country-group > label[for="billCountryId"] {
  margin-bottom: 3px !important;
}

/* Shipping editable fields use the same rhythm. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block {
  margin: 0 !important;
  padding: 0 !important;
}

/* Read-only delivery country: same label styling, then a quiet box.
   The content cluster is vertically centered inside the box. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > p.label {
  position: static !important;
  order: 1 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 0 3px !important;
  padding: 0 !important;
  transform: none !important;
  background: transparent !important;
  line-height: 1.35 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note {
  order: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Delivery country text: remove native inline element metrics so the
   two-line text cluster is mathematically centered inside the box. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note > strong,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note > .helpNote {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note > .helpNote {
  margin-top: 2px !important;
}

/* Never let the spacing layer decide whether conditional sections are visible.
   In particular, there are deliberately NO display rules here for:
   #company-info, #shipping-address, .im-delivery-company-group. */

/* ============================================================
   STEP 2 – COMPACT DESKTOP WIDTH + SMALL REQUIRED LEGEND
   ============================================================ */

/* "Povinná pole" stays secondary and compact. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .form-legend,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .form-legend .required-asterisk {
  font-size: 10.5px !important;
  line-height: 1.25 !important;
}

/* Desktop only: text/select controls are capped at 600px without touching
   checkbox rows, unveil state, validation, or Shoptet runtime behavior. */
@media (min-width: 992px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .smart-label-wrapper.form-group--inline > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note {
    width: 100% !important;
    max-width: 600px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group input.form-control,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address input.form-control,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address select.form-control,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address input.form-control,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address select.form-control,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input {
    width: 100% !important;
    max-width: 600px !important;
  }
}

/* ============================================================
   STEP 2 – CLEAR FORM LAYOUT v22
   Layout only. No conditional visibility/state rules.
   ============================================================ */

/* Clearer section rhythm while keeping the form compact. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information > h2,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .header-billing,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > h2 {
  margin-bottom: 14px !important;
}

/* Personal data: one stable vertical axis, consistent label/control alignment. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group {
  width: 100% !important;
  max-width: 600px !important;
  align-items: stretch !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > label {
  display: block !important;
  width: 100% !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > .form-control-wrapper {
  width: 100% !important;
  max-width: 600px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Normalize control height in personal data, including phone row. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group input.form-control {
  min-height: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: normal !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input {
  align-items: center !important;
  min-height: 48px !important;
  height: 48px !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input .country-flags,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input input.form-control {
  align-self: center !important;
  min-height: 48px !important;
  height: 48px !important;
}

/* Delivery-country note: text block is centered as a unit, without grey box. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note {
  min-height: 42px !important;
  height: 42px !important;
  justify-content: center !important;
  padding: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note > strong,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .im-delivery-country-group > .form-control-wrapper--with-note > .helpNote {
  line-height: 1.15 !important;
}

/* Desktop: readable 600px form column. City + ZIP share exactly the same 600px row. */
@media (min-width: 992px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    column-gap: 12px !important;
    row-gap: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > h2,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .company-shopping,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > #company-info,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .form-group:has(#billStreet),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .im-billing-country-group {
    flex: 0 0 600px !important;
    width: 600px !important;
    max-width: 600px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .form-group:has(#billCity),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .form-group:has(#billZip) {
    flex: 0 0 294px !important;
    width: 294px !important;
    max-width: 300px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .form-group:has(#billCity) > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .form-group:has(#billZip) > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #billCity,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #billZip {
    width: 100% !important;
    max-width: 300px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > h2,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .form-option-block,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .im-delivery-country-group {
    width: 100% !important;
    max-width: 600px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    column-gap: 12px !important;
    row-gap: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .form-group:not(:has(#deliveryCity)):not(:has(#deliveryZip)) {
    flex: 0 0 600px !important;
    width: 600px !important;
    max-width: 600px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .form-group:has(#deliveryCity),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .form-group:has(#deliveryZip) {
    flex: 0 0 294px !important;
    width: 294px !important;
    max-width: 300px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-group:has(#deliveryCity) > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-group:has(#deliveryZip) > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address #deliveryCity,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address #deliveryZip {
    width: 100% !important;
    max-width: 300px !important;
  }
}

/* Mobile/tablet: all personal/billing/shipping fields return to one clean column. */
@media (max-width: 991px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address fieldset.box > .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address > .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-shipping-address .form-option-block > .smart-label-wrapper.form-group--inline {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group input.form-control,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input {
    align-items: center !important;
  }
}


/* ============================================================
   STEP 2 – COMPANY FIELDS v22
   Layout/spacing only. Visibility remains owned by checkout JS.
   ============================================================ */

/* Always keep a clear 15px gap below the company-shopping checkbox row. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .company-shopping {
  margin-bottom: 15px !important;
}

/* Company fields use exactly the same vertical rhythm as the rest of Step 2. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline {
  gap: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 11px !important;
  padding: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group > label,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > label {
  margin-top: 0 !important;
  margin-bottom: 4px !important;
  padding: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group > .form-control-wrapper,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > .form-control-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 992px) {
  /* Do not set display here: hidden/visible state remains controlled by JS.
     When JS makes #company-info flex, these rules only define its geometry. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info {
    flex-flow: row wrap !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    column-gap: 12px !important;
    row-gap: 0 !important;
    width: 600px !important;
    max-width: 600px !important;
  }

  /* Company name = one regular full-width 600px field. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group:has(#billCompany),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#billCompany) {
    flex: 0 0 600px !important;
    width: 600px !important;
    max-width: 600px !important;
  }

  /* IČ + DIČ = two equal 294px columns + 12px gap = exactly 600px. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group:has(#companyId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group:has(#vatId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#companyId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#vatId) {
    flex: 0 0 294px !important;
    width: 294px !important;
    max-width: 294px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info #billCompany,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info .form-group:has(#billCompany) > .form-control-wrapper {
    width: 100% !important;
    max-width: 600px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info #companyId,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info #vatId,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info .form-group:has(#companyId) > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info .form-group:has(#vatId) > .form-control-wrapper {
    width: 100% !important;
    max-width: 294px !important;
  }
}

@media (max-width: 991px) {
  /* Mobile keeps the company section on one clean vertical axis. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info {
    flex-flow: column nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .form-group > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > .form-control-wrapper {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ============================================================
   STEP 2 – v23 BILLING + MOBILE SPACING HOTFIX
   Visual layout only. Checkbox visibility/state remains owned by JS.
   ============================================================ */

/* Keep the company checkbox separated from the revealed company fields. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .company-shopping {
  margin: 0 0 15px !important;
}

@media (min-width: 992px) {
  /* The runtime intentionally reveals #company-info as flex/column. Using
     flex-basis on its children therefore turns width values into heights.
     Force the visible desktop company block to a compact 600px grid instead. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 294px)) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    align-content: start !important;
    justify-content: start !important;
    column-gap: 12px !important;
    row-gap: 11px !important;
    width: 600px !important;
    max-width: 600px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline {
    display: flex !important;
    flex: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#billCompany),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#billCompany) {
    grid-column: 1 / -1 !important;
    width: 600px !important;
    max-width: 600px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#companyId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#vatId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#companyId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#vatId) {
    grid-column: auto !important;
    width: 294px !important;
    max-width: 294px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group > label,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > label {
    margin: 0 0 4px !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group > .form-control-wrapper,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > .form-control-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

@media (max-width: 991px) {
  /* Personal data: keep every row compact and top-aligned on mobile. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information {
    align-content: flex-start !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group:last-of-type {
    margin-bottom: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > label {
    position: static !important;
    order: 1 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    transform: none !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .im-contact-field-group > .form-control-wrapper {
    order: 2 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input .country-flags,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-contact-information .phone-combined-input input.form-control {
    align-self: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Company fields: neutralize desktop flex-basis completely on mobile. */
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ============================================================
   STEP 2 – v24 COMPANY BLOCK COMPACT LAYOUT
   Layout only. Visibility/state remains owned by checkout JS.
   ============================================================ */

/* The 15px spacing belongs directly above the company-name row. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .company-shopping {
  margin: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info.visible,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  align-content: flex-start !important;
  justify-content: flex-start !important;
  column-gap: 12px !important;
  row-gap: 10px !important;
  width: min(600px, 100%) !important;
  max-width: 600px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Every company field is a compact label/control stack. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Company name occupies the full 600px row and starts 15px below the checkbox. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#billCompany),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#billCompany) {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 600px !important;
  margin-top: 15px !important;
}

/* IČ + DIČ share one row and together match the company-name width. */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#companyId),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#vatId),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#companyId),
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#vatId) {
  flex: 0 0 calc((100% - 12px) / 2) !important;
  width: calc((100% - 12px) / 2) !important;
  max-width: 294px !important;
  min-width: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group > label,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > label {
  position: static !important;
  inset: auto !important;
  order: 1 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  transform: none !important;
  line-height: 1.35 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group > .form-control-wrapper,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline > .form-control-wrapper {
  position: relative !important;
  order: 2 !important;
  display: block !important;
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info #billCompany,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info #companyId,
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info #vatId {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 991px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info.visible,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info {
    column-gap: 10px !important;
    row-gap: 9px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#companyId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .form-group:has(#vatId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#companyId),
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order.im-company-shopping-active .co-billing-address #company-info > .smart-label-wrapper.form-group--inline:has(#vatId) {
    flex-basis: calc((100% - 10px) / 2) !important;
    width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
  }
}

/* ============================================================
   STEP 2 – v25 FIXED GAP BELOW COMPANY CHECKBOX
   Keep exactly 15px below "Nakupuji na firmu" in both states.
   ============================================================ */
body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .company-shopping {
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 15px !important;
  margin-left: 0 !important;
  padding-bottom: 0 !important;
}

body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) #order-form.sending-order .co-billing-address .company-shopping + #company-info {
  margin-top: 0 !important;
}
/* Mobile only: extra spacing above personal-data labels */
@media (max-width: 991px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart)
  #order-form.sending-order
  .co-contact-information
  label[for="billFullName"],
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart)
  #order-form.sending-order
  .co-contact-information
  label[for="email"],
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart)
  #order-form.sending-order
  .co-contact-information
  label[for="phone"] {
    margin-top: 10px !important;
  }
}

/* Desktop only: 10px spacing above the whole billing street field */
@media (min-width: 992px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart)
  #order-form.sending-order
  .co-billing-address
  .form-group:has(> label[for="billStreet"]) {
    margin-top: 10px !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart)
  #order-form.sending-order
  .co-billing-address
  label[for="billStreet"] {
    margin-top: 0 !important;
  }
}

/* Desktop only: force 10px spacing above the complete billStreet field */
@media (min-width: 992px) {
  html body #order-form.sending-order .form-group.smart-label-wrapper.form-group--inline:has(#billStreet),
  html body #order-form.sending-order div.form-group.smart-label-wrapper.populated.form-group--inline:has(input#billStreet),
  html body #order-form.sending-order .form-group:has(> .form-control-wrapper > #billStreet) {
    margin-top: 10px !important;
  }
}

/* Desktop: keep city + ZIP on the row below street, never beside street. */
@media (min-width: 992px) {
  html body #order-form.sending-order
  .co-billing-address fieldset.box
  > .form-group:has(#billStreet) {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body #order-form.sending-order
  .co-billing-address
  .form-group:has(#billStreet)
  > .form-control-wrapper,
  html body #order-form.sending-order
  .co-billing-address
  #billStreet {
    width: 100% !important;
    max-width: 600px !important;
  }

  html body #order-form.sending-order
  .co-billing-address fieldset.box
  > .form-group:has(#billCity),
  html body #order-form.sending-order
  .co-billing-address fieldset.box
  > .form-group:has(#billZip) {
    flex: 0 0 294px !important;
    width: 294px !important;
    max-width: 300px !important;
  }
}


/* ============================================================
   STEP 2 – v31 deterministic billing address row
   JS v28 marks the actual field groups and also applies inline !important
   desktop geometry so later native/base CSS cannot place city beside street.
   ============================================================ */
@media (min-width: 992px) {
  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-street-group {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-street-group > .form-control-wrapper,
  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-street-group #billStreet {
    width: 100% !important;
    max-width: 600px !important;
  }

  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-city-group,
  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-zip-group {
    flex: 0 0 294px !important;
    width: 294px !important;
    max-width: 300px !important;
  }

  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-city-group > .form-control-wrapper,
  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-zip-group > .form-control-wrapper,
  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-city-group #billCity,
  html body #order-form.sending-order .co-billing-address fieldset.box > .im-billing-zip-group #billZip {
    width: 100% !important;
    max-width: 300px !important;
  }
}

/* =========================================================
   STEP 2 DESKTOP LAYOUT: CHECKOUT + SIDEBAR 70 / 30
   ========================================================= */
/* IONTMAX Checkout – equal checkout/sidebar columns
   Desktop: checkout + sidebar share available parent width 70/30.
   Mobile/tablet: stacked 100%.
*/

@media (min-width: 992px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row {
    display: grid !important;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr) !important;
    align-items: start !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > #checkoutContent,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > .col-md-8 {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    padding: 0 !important;
    float: none !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > #checkoutSidebar,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > .col-md-4 {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    padding: 0 !important;
    float: none !important;
  }
}

@media (max-width: 991px) {
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row {
    display: flex !important;
    flex-direction: column !important;
  }

  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > #checkoutContent,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > #checkoutSidebar,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > .col-md-8,
  body.ordering-process:not(.in-kosik):not(.in-cart):not(.im-vl-cart) .cart-row > .col-md-4 {
    width: 100% !important;
    max-width: none !important;
  }
}
