/* The gift: one slider, two places. Shared by the home give section and the donate page. */
.gift { display: grid; gap: 22px; }

.gift-amount { display: flex; align-items: baseline; gap: 14px; }
.gift-amount .money { font-size: var(--t-88); color: var(--forest); }
.gift-amount-meta { display: flex; flex-direction: column; gap: 4px; }
.gift-amount .per { font-size: var(--t-14); color: var(--stone); }
.gift-name { font: 500 11px / 1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--stone); min-height: 11px; }

/* stem slider */
.gift-slider { position: relative; height: 44px; --p: 0.0816; }
.gift-slider input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; -webkit-appearance: none; appearance: none; }
.gift-slider input:focus-visible ~ .gift-thumb { outline: 2px solid var(--leaf); outline-offset: 4px; }
.gift-track { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--line-strong); transform: translateY(-50%); border-radius: 2px; }
.gift-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: left center; transform: scaleX(var(--p)); background: linear-gradient(90deg, var(--sprout), var(--leaf)); border-radius: 2px; transition: transform .12s linear; }
.gift-bud { position: absolute; top: 50%; left: calc(var(--x) * 100%); width: 9px; height: 9px; border-radius: 50%; background: var(--canvas); border: 1.5px solid var(--line-strong); transform: translate(-50%, -50%); transition: background .3s, border-color .3s, transform .3s var(--ease); }
.gift-bud.is-lit { background: var(--leaf); border-color: var(--leaf); transform: translate(-50%, -50%) scale(1.15); }
.gift-bud::after { content: attr(data-label); position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font: 500 12px / 1 var(--sans); color: var(--stone); letter-spacing: .02em; white-space: nowrap; }
.gift-bud.is-lit::after { color: var(--forest); }
.gift-thumb { position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 24px; height: 24px; border-radius: 50%; background: var(--forest); border: 3px solid var(--canvas); box-shadow: 0 0 0 1.5px var(--forest); transform: translate(-50%, -50%); transition: left .12s linear; z-index: 1; pointer-events: none; }
.gift-slider:has(input:active) .gift-thumb, .gift-slider:has(input:active) .gift-fill { transition: none; }

.gift-quick { display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center; }
.gift-quick button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-weight: 500; font-size: 15px; color: var(--stone); padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color .3s, border-color .3s; text-align: left; }
.gift-quick button .nm { font: 500 11px / 1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }
.gift-quick button:hover { color: var(--forest); }
.gift-quick button.is-on { color: var(--forest); border-color: var(--leaf); }
.gift-quick button.is-on .nm { color: var(--forest); }
.gift-quick .custom { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--stone); font-size: 15px; }
.gift-quick .custom input { width: 5.5ch; height: 36px; border: 0; border-bottom: 1.5px solid var(--line-strong); background: transparent; font: 500 16px var(--sans); color: var(--forest); text-align: left; padding: 0 2px; -moz-appearance: textfield; }
.gift-quick .custom input::-webkit-inner-spin-button { -webkit-appearance: none; }
.gift-quick .custom input:focus { outline: none; border-color: var(--leaf); }

.gift-what { color: var(--stone); font-size: var(--t-16); min-height: 1.6em; margin-top: -6px; margin-bottom: 0; }
.gift-what b { color: var(--forest); font-weight: 500; }

/* the split: two photographs and the thread between them */
.gift-split { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: -8px; }
.gift-side { position: relative; margin: 0; border-radius: var(--r-12); overflow: hidden; aspect-ratio: 4 / 3; isolation: isolate; color: #fff; }
.gift-side img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease); }
.gift-split.is-bumping .gift-side img { transform: scale(1.06); }
.gift-side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,18,12,.72), rgba(6,18,12,.1) 55%, transparent); }
.gift-side figcaption { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: grid; gap: 4px; }
.gift-side figcaption > span:first-child { font: 500 11px / 1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.gift-side figcaption .money { font-size: var(--t-36); }

.gift .btn-give { height: 60px; padding: 0 30px; font-size: var(--t-18); justify-self: stretch; }
.gift-note { font-size: 13px; color: var(--stone); display: flex; flex-wrap: wrap; gap: 6px 20px; }
.gift-note span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); margin-right: 8px; vertical-align: middle; }

/* dark variant (forest panel) */
.gift.on-dark { color: #fff; }
.gift.on-dark .gift-amount .money, .gift.on-dark .gift-quick button.is-on, .gift.on-dark .gift-what b, .gift.on-dark .gift-bud.is-lit::after, .gift.on-dark .gift-quick .custom input { color: #fff; }
.gift.on-dark .gift-quick button, .gift.on-dark .gift-what, .gift.on-dark .gift-note, .gift.on-dark .gift-bud::after, .gift.on-dark .gift-quick .custom, .gift.on-dark .gift-name, .gift.on-dark .gift-quick button .nm { color: rgba(255,255,255,.7); }
.gift.on-dark .gift-quick button.is-on .nm { color: rgba(255,255,255,.9); }
.gift.on-dark .gift-track { background: rgba(255,255,255,.22); }
.gift.on-dark .gift-bud { background: var(--forest); border-color: rgba(255,255,255,.35); }
.gift.on-dark .gift-bud.is-lit { background: var(--sprout); border-color: var(--sprout); }
.gift.on-dark .gift-thumb { background: var(--sprout); border-color: var(--forest); box-shadow: 0 0 0 1.5px var(--sprout); }
.gift.on-dark .gift-fill { background: linear-gradient(90deg, var(--leaf), var(--sprout)); }

@media (max-width: 560px) {
  .gift-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
  .gift-quick .custom { grid-column: 1 / -1; margin-left: 0; }
  .gift-amount .money { font-size: var(--t-64); }
}
@media (prefers-reduced-motion: reduce) { .gift-split.is-bumping .gift-side img { transform: none; }  }
