.lio-uplift-bar {
  --lio-teal: #287e82;
  --lio-aqua: #6bc3c5;
  --lio-peach: #f6b7a9;
  --lio-coral: #e97868;
  --lio-ink: #24585a;
  position: fixed;
  z-index: 99990;
  right: max(8px, env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: max(8px, env(safe-area-inset-left));
  max-width: 430px;
  margin: auto;
  padding: 15px 16px 13px;
  border: 1px solid rgba(40, 126, 130, 0.14);
  border-radius: 22px;
  background: #fff;
  color: var(--lio-ink);
  box-shadow: 0 15px 38px rgba(40, 126, 130, 0.18), 0 2px 10px rgba(246, 183, 169, 0.18);
  font-family: inherit;
  direction: rtl;
  transform: translateY(calc(100% + 30px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.24s ease, visibility 0.4s;
  box-sizing: border-box;
}

.lio-uplift-bar * {
  box-sizing: border-box;
}

.lio-uplift-bar[hidden] {
  display: none !important;
}

/* Shared visual identity with the floating capsule: the expanded Cart surface
   stays white and calm while its decisive accents use Goftino magenta. */
.lio-uplift-bar--goftino {
  --lio-goftino: #f51770;
  --lio-goftino-deep: #c80b52;
  border-color: rgba(245, 23, 112, 0.15);
  box-shadow: 0 18px 44px rgba(40, 126, 130, 0.16), 0 3px 0 rgba(245, 23, 112, 0.72);
  font-family: iranyekan, IRANSansX, Tahoma, sans-serif;
}

.lio-uplift-bar--goftino .lio-uplift-bar__head strong {
  font-weight: 800;
  letter-spacing: -0.12px;
}

.lio-uplift-bar--goftino .lio-uplift-bar__track {
  background: linear-gradient(90deg, #ffb7cc, #f8d1c7);
}

.lio-uplift-bar--goftino .lio-uplift-bar__primary {
  border-bottom-color: var(--lio-peach);
  background: linear-gradient(112deg, var(--lio-goftino), var(--lio-goftino-deep));
  box-shadow: 0 8px 18px rgba(245, 23, 112, 0.2);
}

.lio-uplift-bar--goftino .lio-uplift-bar__secondary {
  border-color: rgba(245, 23, 112, 0.25);
}

.lio-uplift-bar--goftino .lio-uplift-bar__gift,
.lio-uplift-bar--goftino .lio-uplift-bar__gift b {
  color: var(--lio-goftino);
}

.lio-uplift-bar--goftino .lio-uplift-bar__gift .gift-box {
  fill: #ff83a9;
  stroke: #df155f;
}

.lio-uplift-bar--goftino .lio-uplift-bar__gift .gift-lid > path:first-child {
  fill: #ffb4ca;
  stroke: #df155f;
}

.lio-uplift-bar--goftino .lio-uplift-bar__gift .gift-ribbon {
  fill: #fff;
}

.lio-uplift-bar--goftino .lio-uplift-bar__reward {
  border-color: rgba(245, 23, 112, 0.2);
  background: #fff5f8;
}

.lio-uplift-bar--goftino .lio-uplift-bar__reward strong {
  color: var(--lio-goftino-deep);
}

.lio-uplift-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Temporary browse rail stays below modal/lightbox layers. */
.lio-uplift-bar[data-context="transient"] {
  z-index: 900;
}

/* Cart incident boundary: the persistent rail participates in document flow.
   It cannot cover quantity, coupon, shipping, checkout, or mobile-nav taps. */
.lio-uplift-bar[data-context="cart"] {
  position: relative;
  z-index: 1;
  inset: auto;
  width: 100%;
  max-width: none;
  margin: 0 0 18px;
  transform: translateY(10px);
}

.lio-uplift-bar[data-context="cart"].is-visible {
  transform: translateY(0);
}

.lio-uplift-bar__close {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #858089;
  font: 20px/1 inherit;
  cursor: pointer;
}

/* Woodmart gives every button a filled 42px treatment. Keep this control as
   the approved quiet, borderless close icon without reducing its tap target. */
.lio-uplift-bar button.lio-uplift-bar__close {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #858089 !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 32px !important;
  text-align: center !important;
  text-transform: none !important;
}

.lio-uplift-bar button.lio-uplift-bar__close:hover,
.lio-uplift-bar button.lio-uplift-bar__close:focus-visible {
  background: rgba(36, 88, 90, 0.06) !important;
  color: #24585a !important;
}

.lio-uplift-bar__head {
  padding: 0 6px 0 30px;
  text-align: right;
}

.lio-uplift-bar__head strong,
.lio-uplift-bar__head small {
  display: block;
}

.lio-uplift-bar__head strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
}

.lio-uplift-bar__head small {
  margin-top: 2px;
  color: #77737d;
  font-size: 12px;
  line-height: 1.7;
}

.lio-uplift-bar__rail {
  position: relative;
  height: 56px;
  margin: 10px 6px 8px;
  direction: ltr;
}

.lio-uplift-bar__track,
.lio-uplift-bar__fill {
  position: absolute;
  top: 21px;
  right: 0;
  height: 5px;
  border-radius: 999px;
}

.lio-uplift-bar__track {
  left: 0;
  background: linear-gradient(90deg, #f7b8aa, #f8d1c7);
}

.lio-uplift-bar__fill {
  left: auto;
  width: 0;
  overflow: hidden;
  background: linear-gradient(90deg, var(--lio-aqua), var(--lio-teal));
  box-shadow: 0 2px 5px rgba(40, 126, 130, 0.13);
  transition: width 0.55s ease;
}

.lio-uplift-bar__fill::after {
  position: absolute;
  inset: 0;
  content: '';
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: translateX(-260%);
}

.lio-uplift-bar__milestone {
  position: absolute;
  top: 4px;
  display: grid;
  width: 44px;
  place-items: center;
  transform: translateX(-50%);
  color: var(--lio-teal);
}

.lio-uplift-bar__milestone svg {
  width: 36px;
  height: 30px;
  overflow: visible;
  filter: drop-shadow(0 3px 3px rgba(40, 126, 130, 0.16));
}

.lio-uplift-bar__truck svg {
  width: 38px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lio-uplift-bar__truck .truck-box {
  fill: #d9f0ee;
}

.lio-uplift-bar__truck .truck-shadow {
  fill: rgba(40, 126, 130, 0.13);
  stroke: none;
}

.lio-uplift-bar__truck .truck-box-shine {
  fill: rgba(255, 255, 255, 0.48);
  stroke: none;
}

.lio-uplift-bar__truck .truck-cab {
  fill: #fff;
}

.lio-uplift-bar__truck .truck-window {
  fill: #f8cfc5;
  stroke-width: 1.35;
}

.lio-uplift-bar__truck .truck-bumper {
  stroke-width: 1.45;
}

.lio-uplift-bar__truck .truck-detail {
  opacity: 0.56;
  stroke-width: 1.3;
}

.lio-uplift-bar__truck .truck-wheel {
  fill: #fff;
  stroke-width: 1.9;
}

.lio-uplift-bar__truck .truck-hub {
  fill: #f7b8aa;
  stroke: none;
}

.lio-uplift-bar__milestone b {
  position: absolute;
  top: 33px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
}

.lio-uplift-bar__milestone i {
  display: none;
  position: absolute;
  top: -3px;
  right: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--lio-peach);
  color: var(--lio-teal);
  box-shadow: 0 2px 5px rgba(40, 126, 130, 0.15);
  font: 700 10px/15px Tahoma, sans-serif;
  text-align: center;
}

.lio-uplift-bar__truck {
  left: 0;
}

.lio-uplift-bar__gift {
  left: 0;
  display: none;
  color: var(--lio-coral);
}

/* 0.10 staged rail: the first scale ends at the reward; after unlock the
   rail expands to the verified automatic-shipping target. */
.lio-uplift-bar[data-stage="offer"] .lio-uplift-bar__truck { opacity: 0; visibility: hidden; }
.lio-uplift-bar[data-stage="offer"] .lio-uplift-bar__gift { opacity: 1; visibility: visible; }
.lio-uplift-bar[data-stage="shipping"] .lio-uplift-bar__gift,
.lio-uplift-bar[data-stage="shipping_complete"] .lio-uplift-bar__gift { opacity: 1; visibility: visible; }
.lio-uplift-bar[data-stage="shipping"] .lio-uplift-bar__gift .gift-lid { transform: translateY(-8px) rotate(-9deg); }

.lio-uplift-bar__gift svg {
  width: 38px;
  height: 34px;
  filter: drop-shadow(0 4px 4px rgba(233, 120, 104, 0.18));
}

.lio-uplift-bar__gift b {
  color: var(--lio-coral);
}

.lio-uplift-bar__gift .gift-shadow {
  fill: rgba(40, 126, 130, 0.13);
}

.lio-uplift-bar__gift .gift-box {
  fill: #f5a995;
  stroke: #e97868;
  stroke-width: 1.1;
}

.lio-uplift-bar__gift .gift-box-shine,
.lio-uplift-bar__gift .gift-lid-shine {
  fill: rgba(255, 255, 255, 0.48);
}

.lio-uplift-bar__gift .gift-lid > path:first-child {
  fill: #ffd2c5;
  stroke: #e97868;
  stroke-width: 1.1;
}

.lio-uplift-bar__gift .gift-ribbon {
  fill: #50afb0;
}

.lio-uplift-bar__gift .gift-bow {
  fill: #f6c870;
  stroke: #e6a84d;
  stroke-width: 1;
}

.lio-uplift-bar__gift .gift-lid {
  transform-origin: 10px 18px;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lio-uplift-bar__win {
  position: absolute;
  z-index: 6;
  top: 66px;
  right: 50%;
  display: flex;
  min-height: 50px;
  width: max-content;
  max-width: calc(100% - 42px);
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: linear-gradient(112deg, #f51770, #c80b52);
  color: #fff;
  box-shadow: 0 14px 30px rgba(245, 23, 112, 0.28), 0 3px 0 rgba(246, 183, 169, 0.8);
  pointer-events: none;
  transform: translateX(50%);
}

.lio-uplift-bar__win[hidden] {
  display: none !important;
}

.lio-uplift-bar__win-check {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #c80b52;
  font: 900 16px/1 Tahoma, sans-serif;
}

.lio-uplift-bar__win strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lio-uplift-bar__spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd56b;
}

.lio-uplift-bar__spark.s1 { top: -5px; right: 22%; }
.lio-uplift-bar__spark.s2 { top: 8px; right: -7px; background: #6bc3c5; }
.lio-uplift-bar__spark.s3 { bottom: -6px; right: 32%; background: #ffb7cc; }
.lio-uplift-bar__spark.s4 { bottom: 3px; left: -7px; }
.lio-uplift-bar__spark.s5 { top: -7px; left: 24%; background: #6bc3c5; }
.lio-uplift-bar__spark.s6 { bottom: -4px; left: 42%; background: #fff; }

.lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__win {
  animation: lio-uplift-win-card 1.75s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__spark {
  animation: lio-uplift-spark 0.8s ease-out 0.18s both;
}

.lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__fill::after {
  animation: lio-uplift-progress-shine 0.8s ease 0.25s forwards;
}

.lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__truck {
  animation: lio-uplift-milestone-win 0.62s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.lio-uplift-bar[data-celebrate="true"][data-stage="gift"] .lio-uplift-bar__gift {
  animation: lio-uplift-gift-arrive 0.58s cubic-bezier(0.2, 0.9, 0.2, 1) 0.72s both;
}

.lio-uplift-bar[data-stage="gift"] .lio-uplift-bar__truck i,
.lio-uplift-bar[data-stage="shipping_complete"] .lio-uplift-bar__truck i,
.lio-uplift-bar[data-stage="spend_complete"] .lio-uplift-bar__truck i,
.lio-uplift-bar[data-stage="reward"] .lio-uplift-bar__truck i {
  display: block;
}

.lio-uplift-bar[data-stage="gift"] .lio-uplift-bar__gift,
.lio-uplift-bar[data-stage="reward"] .lio-uplift-bar__gift {
  display: grid;
}

.lio-uplift-bar[data-stage="reward"] .lio-uplift-bar__gift .gift-lid {
  transform: translate(-4px, -7px) rotate(-13deg);
}

.lio-uplift-bar[data-stage="contextual"] .lio-uplift-bar__rail {
  display: none;
}

.lio-uplift-bar__reward {
  margin: 6px 0 10px;
  padding: 10px;
  border: 1px solid rgba(246, 183, 169, 0.28);
  border-radius: 13px;
  background: #fff7dc;
  text-align: center;
}

.lio-uplift-bar__reward [data-lio-copy-code] {
  min-height: 34px;
  border: 1px solid rgba(245, 23, 112, .22);
  border-radius: 999px;
  padding: 5px 12px;
  background: #fff;
  color: #8d1245;
  font: inherit;
  cursor: pointer;
}

.lio-uplift-bar__reward strong {
  display: block;
  color: var(--lio-coral);
  font: 700 17px/1.6 Tahoma, Arial, sans-serif;
  letter-spacing: 0.04em;
}

.lio-uplift-bar__reward small {
  display: block;
  color: #77737d;
  font-size: 11px;
}

.lio-uplift-bar__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.lio-uplift-bar__primary,
.lio-uplift-bar__secondary {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.lio-uplift-bar__primary {
  border: 0;
  border-bottom: 3px solid var(--lio-peach);
  background: linear-gradient(105deg, var(--lio-teal), var(--lio-aqua));
  color: #fff;
  box-shadow: 0 7px 16px rgba(40, 126, 130, 0.17);
}

.lio-uplift-bar__secondary {
  border: 1px solid rgba(246, 183, 169, 0.78);
  background: #fff;
  color: var(--lio-teal);
  cursor: pointer;
}

.lio-uplift-bar__timer {
  display: block;
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(40, 126, 130, 0.07);
}

.lio-uplift-bar__timer i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lio-peach);
  transform-origin: right;
  animation: lio-uplift-timer 5s linear forwards;
}

.lio-uplift-bar[data-context="cart"] .lio-uplift-bar__timer {
  display: none;
}

.lio-uplift-bar__live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lio-uplift-fly {
  position: fixed;
  z-index: 850;
  object-fit: cover;
  border-radius: 16px;
  pointer-events: none;
  transition: transform 0.72s cubic-bezier(0.2, 0.75, 0.2, 1), opacity 0.68s ease;
  box-shadow: 0 10px 26px rgba(40, 126, 130, 0.22);
}

.lio-uplift-cart-hit {
  animation: lio-uplift-cart-hit 0.44s ease;
}

@keyframes lio-uplift-timer {
  to { transform: scaleX(0); }
}

@keyframes lio-uplift-cart-hit {
  45% { transform: scale(1.14) rotate(-4deg); }
}

@keyframes lio-uplift-win-card {
  0% { opacity: 0; transform: translateX(50%) translateY(10px) scale(0.86); }
  18%, 72% { opacity: 1; transform: translateX(50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(50%) translateY(-7px) scale(0.96); }
}

@keyframes lio-uplift-spark {
  0% { opacity: 0; transform: scale(0.2); }
  35% { opacity: 1; transform: scale(1.45); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.7); }
}

@keyframes lio-uplift-progress-shine {
  0% { opacity: 0; transform: translateX(-260%); }
  26% { opacity: 0.85; }
  100% { opacity: 0; transform: translateX(420%); }
}

@keyframes lio-uplift-milestone-win {
  0% { transform: translateX(-50%) scale(1); }
  45% { transform: translateX(-50%) translateY(-5px) scale(1.12); }
  100% { transform: translateX(-50%) scale(1); }
}

@keyframes lio-uplift-gift-arrive {
  0% { opacity: 0; transform: translateX(-50%) translateY(7px) scale(0.78); }
  70% { opacity: 1; transform: translateX(-50%) translateY(-2px) scale(1.08); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@media (max-width: 480px) {
  .lio-uplift-bar {
    max-width: none;
    bottom: calc(74px + env(safe-area-inset-bottom));
    padding: 13px 14px 11px;
  }

  .lio-uplift-bar[data-context="cart"] {
    bottom: auto;
    right: auto;
    left: auto;
    margin-bottom: 14px;
  }

  .lio-uplift-bar__head strong {
    font-size: 15px;
  }

  .lio-uplift-bar__actions {
    grid-template-columns: 1.12fr 0.88fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lio-uplift-bar,
  .lio-uplift-bar__fill,
  .lio-uplift-fly,
  .lio-uplift-bar__gift .gift-lid {
    transition-duration: 0.01ms !important;
  }

  .lio-uplift-bar__timer i,
  .lio-uplift-cart-hit,
  .lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__win,
  .lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__spark,
  .lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__fill::after,
  .lio-uplift-bar[data-celebrate="true"] .lio-uplift-bar__truck,
  .lio-uplift-bar[data-celebrate="true"][data-stage="gift"] .lio-uplift-bar__gift {
    animation: none !important;
  }
}
