/* ==========================================================================
   DETAILINGSHOP.cz — Redesign košíku a pokladny (Fáze 1 - čisté CSS)
   Soubor: ds-checkout-ui-v2.css
   Scope: výhradně body.ordering-process (Košík + Krok 1 + Krok 2)
   ========================================================================== */

/* 1. Bez horizontálního scrollbaru & zjednodušená checkout hlavička bez rozptylování */
html:has(body.ordering-process),
body.ordering-process,
body.ordering-process .overall-wrapper {
  overflow-x: clip !important;
}

body.ordering-process .top-navigation-bar .top-navigation-menu,
body.ordering-process #header .search,
body.ordering-process #header #navigation,
body.ordering-process #header .menu-helper {
  display: none !important;
}

body.ordering-process header#header {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e9ef !important;
}

body.ordering-process header#header .header-top {
  padding: 12px 0 !important;
  min-height: 60px !important;
}

/* 2. Čisté karty a krokový ukazatel (.cart-header) */
body.ordering-process .cart-content,
body.ordering-process .co-box.box,
body.ordering-process .co-billing-address > fieldset.box,
body.ordering-process #checkoutSidebar .order-summary {
  border-radius: 14px !important;
  border: 1px solid #e5e9ef !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

body.ordering-process ol.cart-header li.active,
body.ordering-process ol.cart-header li.active strong,
body.ordering-process ol.cart-header li.active a {
  color: #02838f !important;
}

body.ordering-process ol.cart-header li.active {
  border-bottom: 2px solid #02838f !important;
}

/* Oprava useknutého mobilního stepperu pod hlavičkou */
@media (max-width: 767px) {
  body.ordering-process ol.cart-header {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    margin: 0 0 14px 0 !important;
    border-radius: 10px !important;
    border: 1px solid #e5e9ef !important;
    background: #ffffff !important;
    padding: 10px 14px !important;
  }

  body.ordering-process ol.cart-header li.active {
    border-bottom: none !important;
    font-weight: 700 !important;
    font-size: 14px !important;
  }
}

/* 3. Krok 1 (Košík): čitelné názvy bez ALL-CAPS, obrácení priority sidebaru, doprava zdarma */
body.ordering-process .cart-table td.p-name a.main-link,
body.ordering-process #summary-box .cart-item-name a {
  text-transform: none !important;
  font-weight: 600 !important;
  color: #1a232b !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
}

body.ordering-process .cart-table td.p-name a.main-link:hover,
body.ordering-process #summary-box .cart-item-name a:hover {
  color: #02838f !important;
}

body.ordering-process .cart-table td.cart-p-image img {
  border-radius: 8px !important;
  border: 1px solid #eef1f5 !important;
}

body.ordering-process .cart-table tr.removeable {
  border-bottom: 1px solid #eef1f5 !important;
}

body.ordering-process .col-md-4.sidebar-in-cart {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

body.ordering-process .col-md-4.sidebar-in-cart > .summary-wrapper {
  order: -1 !important;
  margin-bottom: 0 !important;
}

body.ordering-process .col-md-4.sidebar-in-cart > .checkout-box-wrapper {
  order: 1 !important;
  background: #f8fafb !important;
  overflow-wrap: anywhere !important;
}

@media (min-width: 992px) {
  body.ordering-process .col-md-4.sidebar-in-cart {
    position: sticky !important;
    top: 20px !important;
    align-self: flex-start !important;
  }
}

/* Výrazný tyrkysový progress bar dopravy zdarma (se zachovaným odsazením pro ikonu vlevo) */
body.ordering-process .extras-wrap .extra.delivery {
  background: rgba(2, 131, 143, 0.05) !important;
  border: 1px solid rgba(2, 131, 143, 0.2) !important;
  border-radius: 10px !important;
  padding: 12px 14px 12px 54px !important;
  margin-bottom: 10px !important;
  background-position: 14px center !important;
}

body.ordering-process .extra.delivery .price-range {
  background: #d8e7e9 !important;
  height: 8px !important;
  border-radius: 99px !important;
  overflow: hidden !important;
  margin-top: 8px !important;
}

body.ordering-process .extra.delivery .price-range > div {
  background: #02838f !important;
  height: 100% !important;
  border-radius: 99px !important;
}

/* 4. Krok 2 (Doprava a platba): kompaktní Země/Měna, interaktivní karty, tlačítko odběrného místa */
body.ordering-process #select-country-payment .co-basic-information {
  padding: 14px 20px !important;
  margin-bottom: 16px !important;
}

body.ordering-process #select-country-payment .co-basic-information h2 {
  font-size: 15px !important;
  margin: 0 0 10px 0 !important;
}

body.ordering-process #select-country-payment .co-basic-information .form-group {
  margin-bottom: 4px !important;
}

body.ordering-process .shipping-billing-table .radio-wrapper {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  margin-bottom: 8px !important;
  padding: 2px 6px !important;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease !important;
}

body.ordering-process .shipping-billing-table .radio-wrapper:hover {
  border-color: #94c7cc !important;
  background: #fafdfd !important;
}

body.ordering-process .shipping-billing-table .radio-wrapper.active,
body.ordering-process .shipping-billing-table .radio-wrapper:has(> input:checked) {
  border-color: #02838f !important;
  background: rgba(2, 131, 143, 0.05) !important;
  box-shadow: 0 2px 8px rgba(2, 131, 143, 0.1) !important;
}

body.ordering-process .shipping-billing-table .radio-wrapper:has(> input:disabled) {
  opacity: 0.52 !important;
  background: #f8fafc !important;
  border-style: dashed !important;
}

body.ordering-process .shipping-billing-table .payment-shipping-price.for-free {
  color: #02838f !important;
  font-weight: 700 !important;
}

body.ordering-process .shipping-billing-table .pickup-point-choose a,
body.ordering-process .shipping-billing-table .new-gen-choose a {
  display: inline-flex !important;
  align-items: center !important;
  margin-top: 6px !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  border: 1.5px solid #02838f !important;
  color: #02838f !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

body.ordering-process .shipping-billing-table .pickup-point-choose a:hover,
body.ordering-process .shipping-billing-table .new-gen-choose a:hover {
  background: #02838f !important;
  color: #ffffff !important;
}

/* 5. Pravý sidebar (Kroky 2 & 3): potlačení konkurenční tyrkysové na Pomoc, čistá rekapitulace a silné CTA */
body.ordering-process #checkoutSidebar .checkout-box {
  margin-bottom: 10px !important;
}

body.ordering-process #checkoutSidebar .checkout-box .toggle-contacts {
  background: #f4f7f9 !important;
  color: #334155 !important;
  border: 1px solid #dce3ea !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 9px 14px !important;
  box-shadow: none !important;
  text-transform: none !important;
}

body.ordering-process #checkoutSidebar .checkout-box .toggle-contacts:hover {
  background: #eaf1f4 !important;
  color: #02838f !important;
  border-color: #b7d3d7 !important;
}

body.ordering-process #summary-box .cart-item {
  border-bottom: 1px solid #eef1f5 !important;
  padding: 7px 0 !important;
}

body.ordering-process #summary-box .cart-item > div {
  border-left: none !important;
  border-right: none !important;
}

body.ordering-process #summary-box .recapitulation-single strong,
body.ordering-process #summary-box .recapitulation-single span:first-child {
  white-space: nowrap !important;
}

body.ordering-process .next-step .btn-conversion,
body.ordering-process button#submit-order.btn-conversion {
  background: #02838f !important;
  border-color: #02838f !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  min-height: 48px !important;
  box-shadow: 0 4px 12px rgba(2, 131, 143, 0.22) !important;
}

body.ordering-process .next-step .btn-conversion:hover,
body.ordering-process button#submit-order.btn-conversion:hover {
  background: #026e78 !important;
  border-color: #026e78 !important;
}

/* 6. Krok 3 (Dodací údaje): sjednocená šířka karet, 2sloupcový formulář s popisky nad poli + kompaktní souhlasy */
body.ordering-process .co-billing-address {
  padding: 0 !important;
  margin: 16px 0 0 0 !important;
}

body.ordering-process fieldset.co-contact-information,
body.ordering-process .co-billing-address > fieldset.box {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 22px 26px !important;
  box-sizing: border-box !important;
}

@media (min-width: 768px) {
  body.ordering-process form#order-form.sending-order.inline-form-fields fieldset.co-contact-information,
  body.ordering-process form#order-form.sending-order.inline-form-fields .co-billing-address > fieldset {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 16px !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields fieldset.co-contact-information > *,
  body.ordering-process form#order-form.sending-order.inline-form-fields .co-billing-address > fieldset > * {
    grid-column: 1 / -1 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group:has(#email) {
    grid-column: 1 / 2 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group.phone-form-group {
    grid-column: 2 / 3 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group:has(#billCity) {
    grid-column: 1 / 2 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group:has(#billZip) {
    grid-column: 2 / 3 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group.smart-label-wrapper.form-group--inline {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    margin-bottom: 14px !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group.smart-label-wrapper.form-group--inline > label {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    text-align: left !important;
    padding: 0 0 5px 0 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #334155 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields .form-group.smart-label-wrapper.form-group--inline > .form-control-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields input.form-control,
  body.ordering-process form#order-form.sending-order.inline-form-fields input#billZip.form-control.short {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    border: 1.5px solid #d5dde5 !important;
  }

  body.ordering-process form#order-form.sending-order.inline-form-fields input.form-control:focus {
    border-color: #02838f !important;
    box-shadow: 0 0 0 3px rgba(2, 131, 143, 0.12) !important;
    outline: none !important;
  }
}

/* Zkompaktnění souhlasů v pravém sidebaru Kroku 3 */
body.ordering-process #checkoutSidebar .form-group.consents {
  margin-bottom: 6px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.ordering-process #checkoutSidebar .order-summary-inner {
  padding: 14px 16px !important;
}

body.ordering-process #checkoutSidebar .next-step--step-2 {
  margin-top: 12px !important;
}
