/* "Choose your surprise" picker ("I am" + avatar, reveal options) and the donate card.
   Ported from .design/a/picker.css. Used by the create form, the creator's pending page and /manage. */

.picker { min-width: 0; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.picker__head { padding: var(--s-4) var(--s-4) 0; }
.picker__title { margin: 0; font-size: var(--fs-lg); font-weight: 800; line-height: var(--lh); letter-spacing: -0.01em; }
.picker__sub { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.picker__group { margin: 0; min-width: 0; padding: var(--s-4); border: 0; }
.picker__group + .picker__group { border-top: 1px solid var(--line); }
.picker__label { display: flex; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-3); color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.picker__label span { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--text-3); text-align: right; }

/* "I am": a full-width segmented control, the language switch's pill language on a recessed track.
   Native radios keep arrow-key moves; each option is a 44px target. */
.iam { min-width: 0; margin: 0 0 var(--s-4); padding: 0; border: 0; }
.iam__label { float: left; width: 100%; margin: 0 0 var(--s-2); padding: 0 2px; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
.iam__label + * { clear: both; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); }
.seg__opt { position: relative; display: grid; min-width: 0; margin: 0; cursor: pointer; }
.seg__opt::after { content: ""; position: absolute; inset: -2px 0; }
.seg__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 var(--s-2);
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--ease), color var(--ease);
}
.seg__opt:hover .seg__text { color: var(--text); }
.seg__radio:checked + .seg__text { background: var(--surface-3); color: var(--text); }
.seg__radio:focus-visible + .seg__text { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Under "I am": the round avatar of the assigned picture, centred on a soft accent halo, and Shuffle
   under it (spec part 19). Upper-body crop for a photo, like the header card's; a legacy cartoon is centred. */
.photo { display: grid; place-items: center; gap: var(--s-4); padding: var(--s-2) 0 var(--s-1); }
.photo__av {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
  object-fit: cover;
  object-position: 50% 18%;
  background: var(--surface-2);
}
.photo__av--cartoon { object-position: 50% 32%; }
.photo__shuffle { min-height: var(--tap); padding: 0 var(--s-4); font-size: var(--fs-sm); }
.photo__shuffle .ico { color: var(--accent); }

/* Shared card behaviour: a label wrapping a visually hidden radio */
.card { position: relative; display: block; margin: 0; color: var(--text); font-size: var(--fs-md); font-weight: 400; cursor: pointer; }
.picker button.card {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  text-align: left;
}
.card__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.card__check {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  display: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.card__check .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.card__radio:checked ~ .card__check { display: grid; }
.card__radio:focus-visible ~ .card__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Reveal options: same card language, one per row */
.opts { display: grid; gap: var(--s-2); }
.opt .card__box {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 56px;
  padding: var(--s-3) 44px var(--s-3) var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-md);
  line-height: 1.35;
  transition: border-color var(--ease), background var(--ease);
}
.opt:hover .card__box { border-color: var(--text-3); }
.opt .card__radio:checked ~ .card__box { border-color: var(--accent); background: var(--accent-soft); }
.opt .card__check { top: 50%; right: var(--s-3); margin-top: -11px; }
.opt__ring { position: absolute; top: 50%; right: var(--s-3); width: 22px; height: 22px; margin-top: -11px; border: 2px solid var(--line-strong); border-radius: 50%; }
.opt .card__radio:checked ~ .opt__ring { display: none; }
.opt__thumb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Locked: a button that points at the donate card */
.opt--locked .card__box { padding-right: 76px; color: var(--text-2); }
.opt--locked:focus-visible { outline: 0; }
.opt--locked:focus-visible .card__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.wished .card__box { border-color: var(--accent-line); }
.lockbadge {
  position: absolute;
  top: 50%;
  right: var(--s-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-top: -12px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

/* Custom text, shown when "Write your own" is selected and unlocked */
.custom { margin-top: var(--s-2); }
.custom__area {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  resize: vertical;
  line-height: 1.4;
}
.custom__area:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.custom__meta { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); font-size: var(--fs-xs); }

/* ---- Donate card ---- */
.donate {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.donate.highlight { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.donate__top { display: flex; align-items: center; gap: var(--s-3); }
.donate__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.donate__title { font-weight: 800; }
.donate__sub { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.donate__btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.donate__btn { min-height: var(--tap); border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-weight: 800; font-size: var(--fs-md); transition: background var(--ease), border-color var(--ease); }
.donate__btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.donate__btn--pop { border-color: var(--accent-line); }
.donate__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.donate__btn:disabled:hover { border-color: var(--line-strong); background: var(--surface-2); }
.donate__secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--text-3); font-size: var(--fs-xs); }
.donate__off .ico { color: var(--warn); }

@media (min-width: 700px) {
  .donate { grid-template-columns: 1fr auto; align-items: center; }
  .donate__btns { grid-template-columns: repeat(3, 76px); }
  .donate__secure { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- Promo row: a quiet link under the donate card, opening one input and Apply ---- */
.promo { margin-top: var(--s-3); }
.promo__link {
  position: relative;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.promo__link::after { content: ""; position: absolute; inset: -6px 0; }
.promo__link:hover { color: var(--text); text-decoration-color: currentColor; }
.promo__row { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.promo__input {
  flex: 1;
  min-width: 0;
  height: var(--tap);
  padding: 0 var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-md);
  font-weight: 500;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.promo__input::placeholder { color: var(--text-3); font-weight: 400; }
.promo__input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.promo__input[aria-invalid="true"] { border-color: var(--err-line); background: var(--err-soft); }
.promo__apply { flex: none; }
.promo--applied { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: var(--fs-sm); font-weight: 600; }
