/* ======================================================================
   DOUXDS post-purchase offer.
   One decision, taken by someone who has just paid. Decision above the
   fold; picture and proof underneath, where they belong.
   ====================================================================== */

.du-oto { background: var(--douxds--cream, #F2F6EA); padding: 0 0 34px; }
/* Deliberately NOT grid on mobile. A single column with no gap gains nothing
   from grid, and a grid column sized `auto` stretches to the carousel's
   max-content — which ran the whole block millions of pixels past the right
   edge of the phone. Block layout cannot be stretched by a child. */
.du-oto__inner {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 18px;
}
.du-oto__inner > * { min-width: 0; max-width: 100%; }

/* Reassurance, not alarm. They have just paid; tell them it is safe. */
.du-oto__safe {
  margin: 0 0 16px;
  padding: 11px 14px;
  background: #fff;
  border-left: 3px solid var(--douxds--forest, #062B14);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--douxds--slate, #646C6A);
}

/* The decision block sits on white so it reads as the one thing to do. */
.du-oto__decision {
  background: #fff;
  border: 1px solid #D6DCCB;
  border-radius: 4px;
  padding: 20px 18px 22px;
}
.du-oto__name {
  margin: 0 0 4px;
  font: 700 26px/1.15 "Untitled Sans", Arial, sans-serif;
  color: var(--douxds--forest, #062B14);
  letter-spacing: -.01em;
}
.du-oto__line {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--douxds--slate, #646C6A);
}

/* The choice */
.du-oto__tiers { display: grid; gap: 9px; margin-bottom: 16px; }
.du-tier {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #D6DCCB;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.du-tier:hover { border-color: #A9B593; }
/* Only the SDK's own state styles a selected tier. `.is-selected` was removed
   2026-09-11: it was written into the markup at build time, never moved when
   the SDK changed selection, and left two tiers looking chosen at once. */
.du-tier[data-next-selected="true"],
.du-tier.next-selected {
  border-color: var(--douxds--forest, #062B14);
  border-width: 2px;
  padding: 12px 13px;
  background: var(--douxds--cream, #F2F6EA);
}
.du-tier__radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #B4BDA6; display: block;
}
.du-tier[data-next-selected="true"] .du-tier__radio,
.du-tier.next-selected .du-tier__radio {
  border-color: var(--douxds--forest, #062B14);
  box-shadow: inset 0 0 0 3.5px #fff, inset 0 0 0 10px var(--douxds--forest, #062B14);
}
.du-tier__body { display: grid; gap: 2px; min-width: 0; }
.du-tier__label {
  font: 600 15.5px/1.3 "Untitled Sans", Arial, sans-serif;
  color: var(--douxds--forest, #062B14);
}
.du-tier__hint { font-size: 13px; line-height: 1.4; color: var(--douxds--slate, #646C6A); }
.du-tier__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.du-tier__save {
  align-self: center;
  padding: 4px 9px 3px;
  background: linear-gradient(90deg, #E8AC21 30.49%, #FCDC6D 77.05%);
  color: var(--douxds--forest, #062B14);
  border-radius: 3px;
  font: 700 12px/1 "Untitled Sans", Arial, sans-serif;
  white-space: nowrap;
}

/* Total, stated once */
.du-oto__total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 0 14px; border-top: 1px solid #E4E9DB;
}
.du-oto__total-label { font-size: 14px; color: var(--douxds--slate, #646C6A); }
.du-oto__total-value {
  font: 700 30px/1 "Untitled Sans", Arial, sans-serif;
  color: var(--douxds--forest, #062B14);
}

/* The one thing to press */
.du-oto__yes {
  display: block; width: 100%;
  padding: 17px 20px;
  background: var(--douxds--sage, #C7CFAD);
  color: var(--douxds--forest, #062B14);
  border: 1px solid #000;
  text-align: center;
  text-decoration: none;
  font: 700 16px/1.2 "Untitled Sans", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.du-oto__yes:hover { background: #B6BF9A; }
.du-oto__yes * { color: inherit; }

.du-oto__fine {
  margin: 10px 0 0; font-size: 12.5px; line-height: 1.45;
  text-align: center; color: var(--douxds--slate, #646C6A);
}
.du-oto__ship {
  margin: 8px 0 0; font-size: 12.5px; font-weight: 600;
  text-align: center; color: var(--douxds--slate, #646C6A);
}

/* Supporting material, deliberately after the decision */
.du-oto__media { margin: 22px 0 0; max-width: 100%; overflow: hidden; }
.du-oto__media .swiper { max-width: 100%; }
.du-oto__media img { border-radius: 4px; }
.du-oto__points {
  list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 9px;
}
.du-oto__points li {
  position: relative; padding-left: 26px;
  font-size: 15px; line-height: 1.45; color: var(--douxds--forest, #062B14);
}
.du-oto__points li::before {
  content: ""; position: absolute; left: 2px; top: .34em;
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--douxds--forest, #062B14);
}
.du-oto__points li::after {
  content: ""; position: absolute; left: 6px; top: .6em;
  width: 6px; height: 3px;
  border-left: 1.5px solid var(--douxds--forest, #062B14);
  border-bottom: 1.5px solid var(--douxds--forest, #062B14);
  transform: rotate(-45deg);
}

/* Saying no must be easy and unembarrassing */
.du-oto__no {
  display: block; margin: 24px auto 0; padding: 13px 18px;
  max-width: 22rem; text-align: center;
  border: 1px solid #B4BDA6; border-radius: 3px;
  color: var(--douxds--slate, #646C6A);
  text-decoration: none; font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .02em;
}
.du-oto__no:hover { border-color: var(--douxds--forest, #062B14); color: var(--douxds--forest, #062B14); }

/* Desktop: decision on the right, picture on the left, both above the fold */
@media (min-width: 900px) {
  .du-oto__inner {
    max-width: 62rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "safe safe" "media decision" "points decision" "no no";
    gap: 0 34px;
    align-items: start;
  }
  .du-oto__safe { grid-area: safe; }
  .du-oto__media { grid-area: media; margin: 0; }
  .du-oto__decision { grid-area: decision; }
  .du-oto__points { grid-area: points; margin-top: 18px; }
  .du-oto__no { grid-area: no; }
}

/* A single, unchoosable line reads as a statement, not a control */
.du-oto__tiers--single .du-tier--only { cursor: default; }
.du-oto__tiers--single .du-tier--only:hover { border-color: var(--douxds--forest, #062B14); }


/* ----------------------------------------------------------------------
   The wait.

   The offer block cannot render until the SDK has fetched the order, which
   takes a few seconds — and for those seconds the customer was looking at a
   blank white page immediately after paying. The reassurance is true from
   the first paint, so it is shown straight away, with a placeholder standing
   in for the decision until the real one arrives.
   ---------------------------------------------------------------------- */
.du-oto--intro { padding-bottom: 0; }
.du-oto--intro .du-oto__safe { margin-bottom: 0; }
.du-oto__wait {
  display: grid; gap: 10px;
  margin: 16px 0 0;
  padding: 20px 18px 22px;
  background: #fff;
  border: 1px solid #D6DCCB;
  border-radius: 4px;
}
.du-skel {
  display: block; border-radius: 3px;
  background: linear-gradient(90deg, #EDF1E4 25%, #E2E8D6 37%, #EDF1E4 63%);
  background-size: 400% 100%;
  animation: du-skel-shimmer 1.4s ease-in-out infinite;
}
.du-skel--title  { height: 26px; width: 62%; }
.du-skel--line   { height: 14px; width: 88%; margin-bottom: 6px; }
.du-skel--tier   { height: 56px; }
.du-skel--button { height: 54px; margin-top: 6px; }
@keyframes du-skel-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .du-skel { animation: none; }
}
/* The moment the real offer is available, the placeholder goes. */
/* Only next-available means the order actually loaded. Before the SDK runs the
   section carries no class at all, so a :not(.next-hidden) test would hide the
   placeholder on the first paint — exactly when it is needed. */
[data-next-catalog-component="du-upsell-offer"]:has(.du-oto.next-available) .du-oto__wait {
  display: none;
}
/* ...and the offer itself must actually go away when the SDK says to hide it.
   The SDK sets `next-hidden` when no order resolves, but nothing here acted on
   it, so the placeholder and the whole offer rendered at the same time — the
   shimmer boxes with a full product page stacked underneath (Damon, 2026-09-11:
   "why are there these boxes above???"). A real buyer hits this whenever the
   order lookup is slow or the ref has expired, and they see prices that have
   not loaded. One rule, and the skeleton is a loading state again. */
.du-oto.next-hidden { display: none; }
/* The intro carries the reassurance, so the offer block must not repeat it. */
.du-oto:not(.du-oto--intro) .du-oto__safe { display: none; }

@media (min-width: 900px) {
  .du-oto--intro .du-oto__inner { display: block; max-width: 62rem; }
  .du-oto__wait { max-width: 30rem; margin-left: auto; margin-right: auto; }
}
