/* The order bump on the checkout, and the running total under it.
   Kept out of styles.css so the whole feature is one <link> to remove. */

/* The [hidden] guard these need lives in styles.css, once, for the whole site.
   It is load bearing: display:flex below and on .summary-row would otherwise
   beat the attribute, and both the bump and the summary's bump line would show
   whether or not they should. */

/* ---- the bump ----------------------------------------------------------------
   It has to look bolted on. A box that matches the card it sits in reads as more
   small print and gets scrolled past; the whole job of this thing is to stop the
   eye on its way to the pay button. */

.bump {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  text-align: left;
  margin: 26px 0 22px;
  padding: 18px 18px 16px;
  border: 2px dashed var(--marigold-dark, #E8A83F);
  border-radius: 14px;
  background: #FFF8EA;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bump:hover { background: #FFF3DC; }
.bump.is-on {
  background: #FFF3DC;
  border-style: solid;
  border-color: var(--steel-blue, #3B699A);
}

.bump-arrow {
  position: absolute;
  left: -6px;
  top: -14px;
  font-size: 1.5rem;
  transform: rotate(28deg);
  animation: bump-nudge 1.6s ease-in-out infinite;
}
@keyframes bump-nudge {
  0%, 100% { transform: rotate(28deg) translateX(0); }
  50% { transform: rotate(28deg) translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .bump-arrow { animation: none; }
}

/* Big enough to hit with a thumb without aiming. */
.bump-check {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--steel-blue, #3B699A);
  cursor: pointer;
}

.bump-body { flex: 1; min-width: 0; }

.bump-head { display: block; }
.bump-yes {
  font-family: 'Kanit', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink, #2B2620);
  line-height: 1.45;
}

.bump-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 7px 0 9px;
}
.bump-from { color: var(--ink-soft, #5A5148); font-size: 0.92rem; }
/* The gap on .bump-price is 8px, which is too wide between "จาก" and the number
   it introduces - they should read as one phrase. */
.bump-from + .bump-old { margin-left: -4px; }
.bump-old { text-decoration: line-through; color: var(--ink-soft, #5A5148); font-size: 0.92rem; }
.bump-new {
  font-family: 'Kanit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--steel-blue, #3B699A);
}
.bump-save {
  background: var(--marigold, #F9C067);
  color: #6B4A11;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.bump-pitch {
  display: block;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-soft, #5A5148);
}

.bump-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.bump-list li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: 0.87rem;
  line-height: 1.65;
  color: var(--ink, #2B2620);
}
.bump-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--success, #3F8F5B);
  font-weight: 700;
}

.bump-delivery {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--ink-soft, #5A5148);
}

.bump-only {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #B4432B;
}

/* ---- the running total -------------------------------------------------------
   The number on the button changes the instant the box is ticked. A bump whose
   price only shows up on the next screen is the kind that gets charged back. */

.summary {
  text-align: left;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--warm-cream, #FBF3E6);
  font-size: 0.9rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--ink-soft, #5A5148);
}
.summary-bump { color: var(--steel-blue-dark, #2C4F78); font-weight: 600; }
.summary-total {
  margin-top: 6px;
  padding-top: 11px;
  border-top: 1px solid #E4D6BF;
  font-family: 'Kanit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink, #2B2620);
}

@media (max-width: 560px) {
  .bump { padding: 16px 14px 14px; margin-left: -4px; margin-right: -4px; }
  .bump-arrow { left: -2px; font-size: 1.3rem; }
}
