/* ── Loading overlay ─────────────────────────────────── */
.custom_lock {
  position: relative;
}
.custom_lock::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.5;
  z-index: 100;
}
.custom_lock::after {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: 80px;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='0' fill='none' stroke='%23F5400A' stroke-width='3'%3E%3Canimate attributeName='r' values='0;40' dur='1s' begin='-0.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0' dur='1s' begin='-0.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='50' cy='50' r='0' fill='none' stroke='%23F5400A' stroke-width='3'%3E%3Canimate attributeName='r' values='0;40' dur='1s' begin='0s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0' dur='1s' begin='0s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  z-index: 101;
}

/* ── Fieldset card ───────────────────────────────────── */
.custom-fieldset {
  border: 1px solid var(--lv-border, #e2e8f0);
  border-radius: var(--lv-radius-lg, 12px);
  padding: 20px;
  margin-bottom: 20px;
  background: #fff;
}
.custom-legend {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--lv-dark, #0D1B4B);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lv-primary, #1B3EAA);
  display: inline-block;
}

/* ── Required-field marker (JS toggles .required on the wrapper) ─ */
.lv-page-form [id^="customer-field"].required > .form-label::after,
.lv-page-form [id^="shipping-field"].required > .form-label::after {
  content: " *";
  color: #dc3545;
}

/* ── Sticky sidebar ──────────────────────────────────── */
.custom-sticky-block {
  align-self: flex-start;
  position: sticky;
  top: 190px;
}

/* ── Cart list ───────────────────────────────────────── */
.lv-cart-list {
  border: 1px solid var(--lv-border, #e2e8f0);
  border-radius: var(--lv-radius-lg, 12px);
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}

/* Single cart item row */
.lv-cart-item {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--lv-border, #e2e8f0);
  gap: 12px;
  align-items: center;
}
.lv-cart-item:last-child { border-bottom: none; }

/* Thumbnail */
.lv-cart-item__thumb {
  flex-shrink: 0;
  display: block;
  width: 72px;
  height: 72px;
  border-radius: var(--lv-radius, 8px);
  overflow: hidden;
  background: var(--lv-light, #f8fafc);
  margin-left: 4px;
}
.lv-cart-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Content (name + meta + foot) */
.lv-cart-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lv-cart-item__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--lv-dark, #0D1B4B);
  text-decoration: none;
  line-height: 1.3;
  display: block;
}
.lv-cart-item__name:hover { color: var(--lv-primary, #1B3EAA); }
.lv-cart-item__badge { margin-left: 4px; font-size: 12px; }
.lv-cart-item__meta {
  font-size: 12px;
  color: var(--lv-muted, #6c757d);
  line-height: 1.3;
}

/* Bottom row: qty | unit price | spacer | total | remove */
.lv-cart-item__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.lv-cart-item__price {
  font-size: 12px;
  color: var(--lv-muted, #6c757d);
}
.lv-cart-item__total {
  font-size: 15px;
  font-weight: 700;
  color: var(--lv-primary, #1B3EAA);
}

/* Quantity stepper */
.lv-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--lv-border, #e2e8f0);
  border-radius: 20px;
  overflow: hidden;
  height: 28px;
}
.lv-cart-qty__btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--lv-dark, #0D1B4B);
  transition: background .15s, color .15s;
  padding: 0;
  flex-shrink: 0;
}
.lv-cart-qty__btn:hover:not(:disabled) {
  background: var(--lv-primary, #1B3EAA);
  color: #fff;
}
.lv-cart-qty__btn:disabled { opacity: .35; cursor: default; }
.lv-cart-qty__input {
  width: 32px;
  height: 28px;
  border: none;
  border-left: 1px solid var(--lv-border, #e2e8f0);
  border-right: 1px solid var(--lv-border, #e2e8f0);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--lv-dark, #0D1B4B);
  background: none;
  outline: none;
  padding: 0;
}

/* Remove button */
.lv-cart-item__remove {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--lv-muted, #6c757d);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
  padding: 0;
}
.lv-cart-item__remove:hover {
  background: #fee2e2;
  color: #dc3545;
}

/* ── Totals ──────────────────────────────────────────── */
.custom-cart-total {
  border: 1px solid var(--lv-border, #e2e8f0);
  border-radius: var(--lv-radius-lg, 12px);
  overflow: hidden;
  background: #fff;
  margin-bottom: 16px;
}
.custom-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--lv-border, #e2e8f0);
  font-size: 14px;
}
.custom-cart-total-row:last-child { border-bottom: none; }
.custom-cart-total-final {
  background: var(--lv-light, #f8fafc);
  font-size: 16px;
}
.custom-cart-total-value { font-weight: 700; color: var(--lv-primary, #1B3EAA); }
.custom-cart-total-final .custom-cart-total-value { font-size: 20px; }

/* ── Accordion panels (coupon / reward / voucher / shipping) ── */
.lv-total-panel {
  border: 1px solid var(--lv-border, #e2e8f0);
  border-radius: var(--lv-radius-lg, 12px);
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.lv-total-panel-header {
  padding: 0;
}
.lv-panel-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lv-dark, #0D1B4B);
  text-decoration: none;
  background: var(--lv-light, #f8fafc);
  border-radius: var(--lv-radius-lg, 12px);
  transition: background .15s, color .15s;
}
.lv-panel-toggle:hover {
  background: var(--lv-border, #e2e8f0);
  color: var(--lv-primary, #1B3EAA);
}
.lv-panel-toggle .bi-chevron-down {
  transition: transform .25s;
  flex-shrink: 0;
}
.lv-panel-toggle:not(.collapsed) {
  background: #fff;
  border-bottom: 1px solid var(--lv-border, #e2e8f0);
  border-radius: var(--lv-radius-lg, 12px) var(--lv-radius-lg, 12px) 0 0;
  color: var(--lv-primary, #1B3EAA);
}
.lv-panel-toggle:not(.collapsed) .bi-chevron-down {
  transform: rotate(-180deg);
}
.lv-total-panel-body {
  padding: 14px 16px;
}
.lv-total-panel-body .form-control::placeholder {
  color: #b0b8c1;
  font-weight: 400;
}

/* ── Payment updating ───────────────────────────────── */
#custom-payment {
  transition: opacity 0.25s ease;
}
#custom-payment.lv-updating {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Auth links in customer legend ──────────────────── */
.lv-auth-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
}
.lv-auth-links a {
  color: var(--lv-primary, #1B3EAA);
  text-decoration: none;
}
.lv-auth-links a:hover { text-decoration: underline; }
.lv-auth-links span { color: #cbd5e1; }

/* ── Order button ────────────────────────────────────── */
.lv-btn-order {
  width: 100%;
  justify-content: center;
}

/* ── Checkout control area ───────────────────────────── */
.lv-checkout-control {
  border: 1px solid var(--lv-border, #e2e8f0);
  border-radius: var(--lv-radius-lg, 12px);
  padding: 16px 20px;
  background: #fff;
}

/* ── Auto-registration notice — info look WITHOUT .alert class ──
   Not a Bootstrap .alert, so global $('.alert').remove() (cart/shipping
   updates, checkout steps) can never wipe it. Spacing from utilities. */
.lv-registration-notice {
  color: #055160;
  background-color: #cff4fc;
  border: 1px solid #b6effb;
  border-radius: .375rem;
}

/* ── Shipping autocomplete dropdown (Nova Poshta / Ukrposhta / …) ──────────
   Restyles the module's fixed markup (<ul.dropdown-address><li><a>) without
   touching the module. shippingdata.css is added after this file, so the
   #custom-shipping prefix is what wins - it beats the module's bare
   ul.dropdown-address selectors on specificity regardless of load order. */

/* Anchor the absolutely-positioned <ul> to its own field wrapper so it lines up
   under the input and takes its width from the field, not a distant ancestor. */
#custom-shipping .mb-3 { position: relative; }

#custom-shipping ul.dropdown-address {
  box-sizing: border-box;
  width: 100%;
  left: 0 !important;
  margin: 4px 0 0;
  padding: 4px;
  max-height: 260px;
  background: var(--lv-white, #fff);
  border: 1px solid var(--lv-border, #c9d1e5);
  border-radius: var(--lv-radius, 10px);
  box-shadow: var(--lv-shadow-md, 0 4px 20px rgba(27, 62, 170, .12));
  z-index: 1050;
}
/* The module creates the <ul> visible and only fills it once the ajax returns —
   hide it while empty so the first click doesn't flash a bare 4px box. */
#custom-shipping ul.dropdown-address:empty { display: none !important; }

#custom-shipping .dropdown-address li {
  list-style: none;
  border-radius: 6px;
}
#custom-shipping .dropdown-address li:hover {
  background: color-mix(in srgb, var(--lv-accent, #f5400a) 8%, transparent);
}
#custom-shipping .dropdown-address li a {
  display: block;
  padding: .55em .8em;
  font-size: 14px;
  line-height: 1.4;
  color: var(--lv-body, #2d3748);
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}
#custom-shipping .dropdown-address li:hover a,
#custom-shipping .dropdown-address li a:hover {
  color: var(--lv-accent, #f5400a);
}
/* Slim scrollbar to match the panel */
#custom-shipping ul.dropdown-address::-webkit-scrollbar { width: 8px; }
#custom-shipping ul.dropdown-address::-webkit-scrollbar-thumb {
  background: var(--lv-border, #c9d1e5);
  border-radius: 999px;
}
