/*
 * Mabell — universal mobile cart and checkout
 * Production v10; viewport-safe checkout progress and DOM-grounded account/country hiding.
 * Header/search/menu rules intentionally live in the separate header file.
 */

@media (max-width: 767px) {
  /* Three-step checkout progress
     Keep it inside the mobile viewport. Text may wrap naturally. */
  body.mobile.ordering-process ol.cart-header {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 0 30px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    align-items: stretch !important;
    border: 0 !important;
    border-top: 1px solid #ededed !important;
    border-bottom: 1px solid #ededed !important;
    background: #f7f7f7 !important;
  }

  body.mobile.ordering-process ol.cart-header > li.step {
    display: flex !important;
    position: relative !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
    border: 0 !important;
  }

  body.mobile.ordering-process ol.cart-header > li.step > a,
  body.mobile.ordering-process ol.cart-header > li.step > strong {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 8px 4px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    color: #000 !important;
    font-size: 13px !important;
    line-height: 16px !important;
    text-align: center !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto;
    opacity: 0.5;
  }

  body.mobile.ordering-process ol.cart-header > li.step.active > a,
  body.mobile.ordering-process ol.cart-header > li.step.active > strong {
    font-weight: 500 !important;
    opacity: 1 !important;
  }

  body.mobile.ordering-process ol.cart-header > li.step.completed > a,
  body.mobile.ordering-process ol.cart-header > li.step.completed > strong {
    color: #7c7c7c !important;
    opacity: 1 !important;
  }

  body.mobile.ordering-process ol.cart-header > li.step span {
    min-width: 0 !important;
    padding-left: 0 !important;
  }

  /* Checkout content spacing */
  body.mobile.ordering-process .co-delivery-method,
  body.mobile.ordering-process .co-contact-information {
    padding-top: 0 !important;
  }

  /* Hide only the "Konto klienta" label confirmed in the Shoptet DOM.
     We do NOT hide the whole form group or any inputs. */
  body.mobile.ordering-process
    .co-contact-information > h2 + .form-group.form-group-inline > p.label {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Billing country is rendered in .co-billing-address, not .co-contact-information.
     Hide only the form group that owns Shoptet's exact billCountryIdInput field. */
  body.mobile.ordering-process
    .co-billing-address .form-group:has(#billCountryIdInput) {
    display: none !important;
  }

  /* Continue/back buttons */
  body.mobile.ordering-process .next-step {
    flex-direction: column-reverse !important;
  }

  body.mobile.ordering-process #continue-order-button,
  body.mobile.ordering-process #orderFormButton {
    display: inline-flex !important;
    width: auto !important;
    min-width: 320px !important;
    height: 62px !important;
    margin-bottom: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
  }

  body.mobile.ordering-process .next-step-back {
    display: inline-flex !important;
    position: static !important;
    width: auto !important;
    min-width: 202px !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    text-indent: 0 !important;
    opacity: 0.7 !important;
  }

  body.mobile.ordering-process .next-step-back::before {
    display: none !important;
  }

  body.mobile.ordering-process .btn.next-step-forward,
  body.mobile.ordering-process .btn.next-step-finish {
    display: inline-flex !important;
    width: auto !important;
    min-width: 290px !important;
    height: 62px !important;
    margin: 20px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
  }

  body.mobile.ordering-process .btn.next-step-forward::after {
    top: 0 !important;
  }

  body.mobile.ordering-process .order-summary-inner {
    margin: 10px !important;
    border: 2px solid #737373 !important;
  }
}
