/* Digisire checkout pro (2026-11-14). Loaded on cart and checkout only. */

/* ---------- shipping choice: nothing pre-selected, the customer chooses ---------- */
html body:not(#cp1):not(#cp2) #shipping_method { display: flex !important; flex-direction: column !important; gap: 10px !important; margin: 0 !important; padding: 0 !important; }
html body:not(#cp1):not(#cp2) #shipping_method > li { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 8px 10px !important; margin: 0 !important; padding: 12px 14px !important; border: 1.5px solid #d6e6f0 !important; border-radius: 14px !important; background: #fff !important; text-align: right !important; cursor: pointer; }
html body:not(#cp1):not(#cp2) #shipping_method > li:has(input:checked) { border-color: #0284c7 !important; box-shadow: 0 0 0 2px rgba(2, 132, 199, .18) !important; background: #f0f9ff !important; }
html body:not(#cp1):not(#cp2) #shipping_method > li label { flex: 1 1 0 !important; min-width: 0 !important; margin: 0 !important; font-size: 15.5px !important; font-weight: 600 !important; line-height: 1.45 !important; cursor: pointer; }
html body:not(#cp1):not(#cp2) #shipping_method > li .ds-v3-pickup-check { flex: 1 1 100% !important; margin: 4px 0 0 !important; }
html body:not(#cp1):not(#cp2) .ds-cp-ship-title { display: block; margin: 0 0 8px; font-size: 15.5px; font-weight: 800; color: #0a111f; text-align: right; }
html body:not(#cp1):not(#cp2) .ds-cp-ship-title b { color: #dc2626; font-weight: 800; }
html body:not(#cp1):not(#cp2) .ds-cp-ship-need #shipping_method > li { border-color: #f59e0b !important; }
html body:not(#cp1):not(#cp2) .ds-cp-ship-error { display: block; margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 14.5px; font-weight: 600; text-align: right; }
html body:not(#cp1):not(#cp2) tr.woocommerce-shipping-totals, html body:not(#cp1):not(#cp2) tr.woocommerce-shipping-totals > td { display: block !important; width: 100% !important; text-align: right !important; padding-inline: 0 !important; }
html body:not(#cp1):not(#cp2) tr.woocommerce-shipping-totals > th { display: none !important; }
html body:not(#cp1):not(#cp2) tr.woocommerce-shipping-totals > td::before { content: none !important; display: none !important; }

/* ---------- address fields ---------- */
html body:not(#cp1):not(#cp2).woocommerce-checkout #billing_address_2_field label,
html body:not(#cp1):not(#cp2).woocommerce-checkout #shipping_address_2_field label { position: static !important; width: auto !important; height: auto !important; clip: auto !important; clip-path: none !important; overflow: visible !important; margin: 0 0 6px !important; }
html body:not(#cp1):not(#cp2).woocommerce-checkout.ds-cp-pickup #billing_address_2_field { display: none !important; }
html body:not(#cp1):not(#cp2) .ds-cp-pickup-note { margin: 4px 0 14px; padding: 10px 14px; border-radius: 12px; background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e; font-size: 15px; line-height: 1.5; text-align: right; }

/* ---------- last-minute add-ons: compact cards, never one giant card ---------- */
html body:not(#cp1):not(#cp2) .ds-bump-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr) !important; }
html body:not(#cp1):not(#cp2) .ds-bump-grid[data-count="1"] label.ds-bump-card { display: grid !important; grid-template-columns: 96px minmax(0, 1fr) !important; grid-template-rows: auto auto !important; align-items: stretch !important; }
html body:not(#cp1):not(#cp2) .ds-bump-grid[data-count="1"] .ds-bump-media { grid-row: 1 / span 2 !important; aspect-ratio: auto !important; min-height: 96px !important; }
html body:not(#cp1):not(#cp2) .ds-cp-addons--joined { margin-top: -8px !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card input.ds-cp-cb { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; opacity: 0 !important; pointer-events: none !important; appearance: none !important; -webkit-appearance: none !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card::before, html body:not(#cp1):not(#cp2) label.ds-cp-card::after,
html body:not(#cp1):not(#cp2) label.ds-cp-card input.ds-cp-cb + .ds-bump-media::before, html body:not(#cp1):not(#cp2) label.ds-cp-card input.ds-cp-cb + .ds-bump-media::after { content: none !important; display: none !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card:has(.ds-cp-cb:checked) { border-color: #0284c7 !important; box-shadow: 0 0 0 2px #0284c7, 0 8px 22px rgba(2, 132, 199, .16) !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card:has(.ds-cp-cb:checked) .ds-bump-tick { opacity: 1 !important; transform: scale(1) !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card:has(.ds-cp-cb:checked) .ds-bump-btn { background: #0284c7 !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card:has(.ds-cp-cb:checked) .ds-bump-btn-add { display: none !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card:has(.ds-cp-cb:checked) .ds-bump-btn-on { display: inline-flex !important; }
html body:not(#cp1):not(#cp2) label.ds-cp-card.is-busy { opacity: .55 !important; pointer-events: none !important; }
html body:not(#cp1):not(#cp2) .ds-cp-card .ds-bump-media { background: #fff !important; }
html body:not(#cp1):not(#cp2) .ds-cp-card .ds-bump-media img { object-fit: contain !important; padding: 6px !important; }
html body:not(#cp1):not(#cp2) .ds-cp-card .ds-bump-name { display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
@media (max-width: 600px) {
  /* two compact cards side by side instead of one full-width card per row */
  html body:not(#cp1):not(#cp2) .ds-cp-addons .ds-bump-grid:not([data-count="1"]) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body:not(#cp1):not(#cp2) .ds-cp-addons .ds-bump-grid:not([data-count="1"]) label.ds-bump-card { display: flex !important; flex-direction: column !important; }
  html body:not(#cp1):not(#cp2) .ds-cp-addons .ds-bump-grid:not([data-count="1"]) .ds-bump-media { aspect-ratio: 4 / 3 !important; min-height: 0 !important; grid-row: auto !important; }
}

/* ---------- "customers also bought" slider under the order notes ---------- */
html body:not(#cp1):not(#cp2) .ds-cp-also { margin: 22px 0 0; padding: 16px 14px 14px; background: #f8fafc; border: 1px solid #d6e6f0; border-radius: 16px; text-align: right; }
html body:not(#cp1):not(#cp2) .ds-cp-also__title { margin: 0 0 4px !important; font-size: 19px !important; font-weight: 800 !important; line-height: 1.3 !important; color: #0a111f !important; }
html body:not(#cp1):not(#cp2) .ds-cp-also__sub { margin: 0 0 12px !important; font-size: 14.5px !important; line-height: 1.5 !important; color: #475569 !important; }
html body:not(#cp1):not(#cp2) .ds-cp-also .ds-v3-slider { position: relative; }
html body:not(#cp1):not(#cp2) .ds-cp-also .display-products > .row { display: flex !important; flex-wrap: nowrap !important; margin: 0 !important; }
html body:not(#cp1):not(#cp2) .ds-cp-also .quantity, html body:not(#cp1):not(#cp2) .ds-cp-also .quantity-group-btn > .quantity { display: none !important; }
html body:not(#cp1):not(#cp2) .ds-cp-also .ds-as-track > .item { flex: 0 0 calc(50% - 6px) !important; max-width: calc(50% - 6px) !important; }

/* small cards in the slider: the two buttons stack so their text is never cut */
@media (max-width: 767px) {
  html body:not(#cp1):not(#cp2) .ds-cp-also .ds-cm-card-btns { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 6px !important; }
  html body:not(#cp1):not(#cp2) .ds-cp-also .ds-cm-card-btns > * { width: 100% !important; flex: none !important; }
  /* first name above last name on phones */
  html body:not(#cp1):not(#cp2).woocommerce-checkout .woocommerce-billing-fields__field-wrapper { display: flex !important; flex-direction: column !important; }
  html body:not(#cp1):not(#cp2).woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row { float: none !important; width: 100% !important; }
}
html body:not(#cp1):not(#cp2) .ds-cp-also .ds-as-wrap, html body:not(#cp1):not(#cp2) .ds-cp-also .ds-v3-slider > .woocommerce { background: transparent !important; padding: 0 !important; margin: 0 !important; }
@media (max-width: 767px) {
  /* phones: one whole card per view (iron rule #15: no half card with cut words), so both buttons fit side by side */
  html body:not(#cp1):not(#cp2) .ds-cp-also .ds-as-track > .item { flex: 0 0 100% !important; max-width: 100% !important; }
}
