/* Gift add-on (P5): the card-page section (after the card, on the card's
   own background — so a cream panel) and the editor part. Mobile first. */

/* ---------- card page ---------- */
/* A section of the event page (review #6): shell, heading and type come
   from public/addons/lib/eventpage.css — the card's palette and fonts.
   Intro, group headings, item boxes, the wish row (title · price · action on
   one line) and the fields: the card's compact system (public/shared/card.css
   «Compact sections»). */
.gifts { color: var(--ink, #6f6a66); font-family: var(--sans); }
.gifts-intro { white-space: pre-line; }
.gifts-h { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold, #b58a5a); }
.gifts-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.gifts-wish, .gifts-fund { background: rgba(255,255,255,0.72); border: 1px solid rgba(181,138,90,0.25); display: flex; flex-direction: column; }
.gifts-wish.gifts-taken { opacity: 0.6; }
.gifts-wish-head { display: flex; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; }
.gifts-wish-title { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.25; color: var(--ink, #6f6a66); }
.gifts-wish-note { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-line; }
.gifts-wish-meta { display: flex; gap: 2px 14px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft, #8c8681); }
.gifts-wish-meta:empty { display: none; }
.gifts-link { color: var(--rose-2, #7c4650); }
.gifts-badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(120,160,120,0.15); color: #4f7a4f; white-space: nowrap; }
.gifts-badge-taken { background: rgba(0,0,0,0.06); color: var(--ink-soft, #8c8681); }
.gifts-badge-mine { background: rgba(181,138,90,0.18); color: #7a5a30; }
.gifts-wish-actions, .gifts-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gifts-btn {
  font: inherit; font-size: 15px; padding: 6px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rose-2, #7c4650); background: var(--rose-2, #7c4650); color: #fff;
}
.gifts-btn:disabled { opacity: 0.6; cursor: default; }
.gifts-btn-ghost { background: transparent; color: var(--rose-2, #7c4650); }
.gifts-btn-paypal { display: inline-flex; align-items: center; text-decoration: none; background: #0070ba; border-color: #0070ba; }
.gifts-form { display: flex; flex-direction: column; padding-top: var(--sp-1); }
.gifts-field { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.gifts-input {
  font: inherit; font-size: 16px; border-radius: 10px; border: 1px solid rgba(181,138,90,0.45);
  background: #fff; color: #333; width: 100%;
}
.gifts-err { margin: 0; font-size: 14px; color: #b3444d; }
.gifts-err:empty { display: none; }
.gifts-amounts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gifts-other { flex: 1 1 140px; width: auto; }
.gifts-methods { display: flex; flex-direction: column; gap: var(--sp-2); }
.gifts-method { border-top: 1px solid rgba(181,138,90,0.2); padding-top: var(--sp-2); }
.gifts-method-h { font-size: 14px; font-weight: 600; margin: 0 0 var(--sp-1); color: var(--ink, #6f6a66); }
.gifts-dl { margin: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.gifts-dl-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
.gifts-dl-row dt { font-size: 13px; color: var(--ink-soft, #8c8681); flex: 0 0 100%; }
.gifts-dl-row dd { margin: 0; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex: 1 1 100%; }
.gifts-val { font-size: 15px; color: #333; word-break: break-word; font-variant-numeric: tabular-nums; }
.gifts-val.gifts-iban { white-space: nowrap; word-break: normal; overflow-wrap: normal; letter-spacing: 0.01em; }
.gifts-dd-iban { flex-wrap: wrap; }
.gifts-copy {
  font: inherit; font-size: 13px; padding: 6px 12px; min-height: 36px; border-radius: 999px; cursor: pointer; flex: 0 0 auto;
  border: 1px solid rgba(181,138,90,0.5); background: transparent; color: var(--rose-2, #7c4650);
}
.gifts-copy.gifts-copied { background: rgba(120,160,120,0.15); color: #4f7a4f; border-color: transparent; }
.gifts-qr { margin: var(--sp-2) 0 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gifts-qr img { width: 150px; height: 150px; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.08); }
@media (min-width: 520px) {
  .gifts-dl-row dt { flex: 0 0 110px; }
  .gifts-dl-row dd { flex: 1 1 0; }
}
.gifts-qr figcaption { font-size: 13px; color: var(--ink-soft, #8c8681); text-align: center; }

/* ---------- editor ---------- */
.gifts-ed-h { margin: 18px 0 4px; font-size: 15px; }
.gifts-ed-box { border: 1px solid rgba(0,0,0,0.12); border-radius: 12px; padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.gifts-ed-fs { border: 1px dashed rgba(0,0,0,0.15); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.gifts-ed-fs legend { font-size: 13px; padding: 0 4px; }
.gifts-ed-pair { display: flex; gap: 10px; flex-wrap: wrap; }
.gifts-ed-pair > .row { flex: 1 1 140px; }
.gifts-ed-err { margin: 2px 0 0; font-size: 13px; color: #b3444d; }
.gifts-ed-err:empty { display: none; }
.gifts-ed-bad { border-color: #b3444d !important; }
.gifts-ed-res { background: rgba(181,138,90,0.08); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.gifts-ed-res-count { margin: 0 0 4px; font-weight: 600; }
.gifts-ed-res-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.gifts-ed-problems[hidden] { display: none; }

/* ---------- Gruppengeschenk (card page) ---------- */
.gifts-badge-group { background: rgba(124,70,80,0.12); color: var(--rose-2, #7c4650); }
.gifts-progress {
  -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border: 0; border-radius: 999px;
  background: rgba(181,138,90,0.18); overflow: hidden; color: var(--gold, #b58a5a);
}
.gifts-progress::-webkit-progress-bar { background: rgba(181,138,90,0.18); border-radius: 999px; }
.gifts-progress::-webkit-progress-value { background: var(--gold, #b58a5a); border-radius: 999px; }
.gifts-progress::-moz-progress-bar { background: var(--gold, #b58a5a); border-radius: 999px; }
.gifts-group-stat { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.gifts-group-stat strong { font-size: 16px; color: var(--ink, #6f6a66); }
.gifts-group-done { margin: 0; font-size: 14px; color: #4f7a4f; }
.gifts-group-names { margin: 0; font-size: 14px; color: var(--ink-soft, #8c8681); }
.gifts-group-mine { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gifts-group-pay { border-top: 1px solid rgba(181,138,90,0.25); padding-top: 8px; }
.gifts-group-pay > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--rose-2, #7c4650); }
.gifts-fund-share { box-shadow: none; background: transparent; border: 0; padding: 8px 0 0; }
.gifts-share-amount { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink, #6f6a66); }
.gifts-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; min-height: 32px; }
.gifts-check input { width: 18px; height: 18px; margin-top: 1px; flex: none; }

/* the in-page question before taking a reservation / pledge back (UX #31) */
.gifts-ask {
  margin-top: 10px; padding: 12px 14px; border-radius: 12px;
  background: rgba(179,68,77,0.06); border: 1px solid rgba(179,68,77,0.25);
}
.gifts-ask-text { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--ink, #333); }
.gifts-ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gifts-ask-yes { background: #b3444d; border-color: #b3444d; color: #fff; }
.gifts-ask-err { margin: 8px 0 0; font-size: 13px; color: #b3444d; }
.gifts-dd-iban .gifts-copy { margin-left: auto; }

/* "Statt Blumen" — the donation appeal of a funeral / baptism (review #43):
   quiet, centred text; per charity a card with a labelled link-out and the
   bank details folded under "Per Überweisung spenden". Mobile first. */
.gifts-ch-memory { margin: 0 0 6px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-soft, #8c8681); }
.gifts-ch-text { margin: 0 0 14px; }
.gifts-ch-org .gifts-wish-title { overflow-wrap: anywhere; }
.gifts-ch-donate { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.gifts-ch-bank { border-top: 1px solid rgba(181,138,90,0.25); padding-top: 8px; }
.gifts-ch-bank > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--rose-2, #7c4650); }
.gifts-ch-bank .gifts-fund { box-shadow: none; background: transparent; border: 0; padding: 8px 0 0; }
@media (max-width: 420px) {
  .gifts-ch-donate { width: 100%; }
}

/* editor: the preset's switch box */
.gifts-ed-ch { border: 1px solid rgba(181,138,90,0.45); border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; background: rgba(181,138,90,0.06); }
.gifts-ed-ch .gifts-ed-box { background: #fff; }

/* amount + unit (public/addons/lib/units.js) */
.amount-unit-line { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.amount-unit-line > .amount-unit-amount { flex: 1 1 90px; min-width: 0; width: auto; }
.amount-unit-line > .amount-unit-select { flex: 0 0 auto; width: auto; }
.amount-unit-line > .amount-unit-own { flex: 1 1 100%; min-width: 0; }
.amount-unit-line > .amount-unit-own[hidden] { display: none; }
.gifts-ed-pair > .gifts-ed-amount { flex: 2 1 220px; }
/* Gruppengeschenk: how the guest gives — transfer or cash at the party (Karl 2026-10-08 #15) */
.gifts-ways { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; display: grid; gap: 4px; }
.gifts-ways legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 4px; }
/* editor: a group gift's payment details, right at the wish */
.gifts-ed-grouppay { border-style: solid; }
.gifts-ed-grouppay-fields { min-width: 0; }
/* #27: picking the account's payment methods; greyed-out options */
.gifts-ed-pay .gifts-ed-paymethod { overflow-wrap: anywhere; }
.gifts-ed .is-off { opacity: 0.55; cursor: not-allowed; }
.gifts-ed button:disabled { opacity: 0.5; cursor: not-allowed; }
/* common wishes (#32): one tap adds one; those on the list are marked */
.gifts-ed-sug { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.gifts-ed-sug .btn.is-added { opacity: 0.6; cursor: default; }
/* the same suggestions as a dropdown on a phone (Karl 2026-10-21), the buttons on a wide screen */
.gifts-ed-sug .gifts-ed-sug-sel { display: none; width: 100%; }
@media (max-width: 560px) {
  .gifts-ed-sug .gifts-ed-sug-b { display: none; }
  .gifts-ed-sug .gifts-ed-sug-sel { display: block; }
}
