/* דף ההרשמה הציבורי — בהיר ונקי: רקע לבן חמים, בורדו להדגשות ולפעולות, זהב בנגיעות קטנות.
   הבסיס (כפתורים, שדות, הודעות) מ-../gabbai/style.css; כאן הצבעים, הגופן והמבנה של הדף הציבורי.
   ניגודיות: בורדו על לבן ≈ 10:1, טקסט כהה ≈ 15:1, אפור משני ≈ 7:1. הזהב לקווים ולקישוט בלבד.
   תנועה: רק הכרטיס זז (כניסה אחת בטעינה), מעבר קצר בין שלבים, והתוצאות מופיעות בהדרגה. הלוגו והכותרות יציבים. */

/* Heebo — נשמר באתר עצמו (מדיניות התוכן מתירה גופנים רק מכאן). רישיון: /assets/fonts/OFL.txt */
@font-face {
  font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/heebo-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/heebo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.public {
  --primary: #7a1527;          /* בורדו הלוגו */
  --primary-strong: #5a0e1c;
  --primary-soft: #f7e9eb;
  --on-primary: #ffffff;
  --gold: #b8892c;
  --gold-line: rgb(184 137 44 / .45);
  --gold-soft: #f7efdc;
  --gold-ink: #6e4f10;         /* טקסט על רקע זהב בהיר: ≈ 6:1 */
  --ink: #1e1916;
  --muted: #5d534c;
  --bg: #f3eee5;               /* רקע בהיר וחמים מסביב לכרטיס הלבן */
  --line: #e2d9ca;
  --line-soft: #eee7dc;
  --ring: #5a0e1c;
  --ok: #2f6b33;   --ok-bg: #e7f2e3;
  --soft-shadow: 0 1px 2px rgb(60 30 20 / .05), 0 8px 24px -14px rgb(60 30 20 / .22);
  background: var(--bg);
  font-family: "Heebo", system-ui, "Segoe UI", Arial, sans-serif;
}
body.public button, body.public input { font-family: inherit; }
body.public #app { max-width: none; padding: 0; min-height: 100dvh; display: flex; flex-direction: column; }

/* ── הכרטיס: כל הדף בתוך מלבן לבן אחד באמצע המסך ───────────────────
   הרווח מעליו גמיש לפי גובה המסך, ולא תלוי בתוכן — כך הכרטיס לא קופץ כשמופיעות תוצאות. */
.stage { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: clamp(16px, 6vh, 56px) 16px clamp(24px, 6vh, 56px); }
.sheet {
  width: 100%; max-width: 580px; background: #fff;      /* לבן מלא, בלי שקיפות */
  border: 1px solid #ebe2d3; border-radius: 20px;
  box-shadow: 0 1px 2px rgb(60 30 20 / .06), 0 20px 50px -24px rgb(90 14 28 / .3);
}

/* ראש הכרטיס: הלוגו המקורי (480×313) בלי חיתוך, מתיחה או מסגרת — רוחב קבוע, הגובה לפי היחס המקורי */
.hero { text-align: center; padding: 28px 24px 0; color: var(--primary); }
.hero .logo { display: block; margin: 0 auto; width: min(240px, 68vw); height: auto; max-width: none; }
.hero .brand-title { margin-top: 6px; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--primary); }
.hero .brand-sub { font-weight: 500; color: var(--muted); }
.hero::after { content: ""; display: block; width: 48px; height: 2px; margin: 18px auto 0; background: var(--gold); border-radius: 2px; }   /* נגיעת זהב */

/* תוכן הכרטיס */
.page { padding: 22px 36px 34px; }
.center { text-align: center; }

.title-block { text-align: center; margin-bottom: 22px; }
.ornament { font-size: 25px; font-weight: 700; line-height: 1.25; margin: 0 0 10px; color: #17110e; letter-spacing: -0.01em; }
body.public .open-badge {
  display: inline-block; padding: 4px 14px; font-size: 14px; font-weight: 500;
  background: var(--gold-soft); color: var(--gold-ink); border: 1px solid #ecdcb4;
  font-variant-numeric: tabular-nums;
}

/* ── שלושת השלבים (מימין לשמאל), קומפקטיים וקרובים לחיפוש ─────────── */
.stepper {
  list-style: none; margin: 0 auto 28px; padding: 0; max-width: 440px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative;
}
.stepper::before { content: ""; position: absolute; top: 13px; inset-inline: 16.6%; height: 1.5px; background: var(--line); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stepper .dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: .85rem; background: #fff; color: var(--muted); border: 1.5px solid #d3c8b6;
  font-variant-numeric: tabular-nums;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.stepper .dot .icon { width: 16px; height: 16px; }
.stepper .label { font-size: 14px; color: #4f4640; }
.stepper li.current .dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.stepper li.current .label { color: var(--primary); font-weight: 700; }
.stepper li.done .dot { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.stepper li.done .label { color: var(--ink); }

/* ── כרטיסים: מסגרת דקה, פינות מעוגלות וצל רך ──────────────────────── */
body.public .card { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 22px 18px; box-shadow: var(--soft-shadow); }
.card-title { text-align: center; font-size: 22px; font-weight: 700; margin: 0 0 4px; color: #17110e; }

/* בתוך הכרטיס הגדול אין כרטיס נוסף: החיפוש, האישור והודעת "סגור" יושבים ישר עליו */
body.public .sheet .card { background: none; border: none; box-shadow: none; padding: 0; margin: 0 auto; max-width: 520px; border-radius: 0; }
body.public .search-card .card-title { margin-bottom: 14px; }
body.public .search-card .field-label { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #2a221e; }
body.public .search input {
  min-height: 60px; border-radius: 14px; border: 1px solid #cfc3b0; background: #fff; font-size: 18px;
  box-shadow: 0 1px 2px rgb(60 30 20 / .04), 0 4px 14px -10px rgb(60 30 20 / .25);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
body.public .search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
body.public .search input::placeholder { color: #7a6f66; }   /* ≈ 4.6:1 */
body.public .search .icon { color: #8a7f75; }
body.public .search:focus-within .icon { color: var(--primary); }
.hint { text-align: center; color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.search-card .hint { text-align: start; margin-top: 6px; color: #554c45; }
.similar-note { margin: 16px 0 4px; font-weight: 600; color: var(--gold-ink); font-size: .95rem; }

/* תוצאות: שורות לבנות ברורות, כל השורה לחיצה */
.families { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.families button {
  width: 100%; min-height: 64px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: start; font-weight: 400; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgb(60 30 20 / .04);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.families .who { display: flex; flex-direction: column; min-width: 0; }
.families .name { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.families .sub { color: var(--muted); font-size: .85rem; }
.families .go {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); transition: background-color 150ms ease, color 150ms ease;
}
.families .go .icon { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .families button:hover { border-color: var(--primary); background: #fff; color: var(--ink); box-shadow: var(--soft-shadow); }
  .families button:hover .go { background: var(--primary); color: var(--on-primary); }
}
/* מעבר בין השמות בחיצים או ב-Tab: השם הנבחר מודגש בבירור */
.families button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-color: var(--primary); background: #fff; }

/* עזרה: שקטה, כדי שהחיפוש יישאר הפעולה המרכזית */
.help { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 28px auto 0; max-width: 520px; text-align: center; }
.help-text { color: #4a413b; font-size: 16px; }
.help a { color: var(--primary); font-size: 15px; text-decoration: none; overflow-wrap: anywhere; padding: 4px 6px; }
.help a:hover { text-decoration: underline; }

/* ── אישור לפני התשלום ────────────────────────────────────────────── */
.summary { margin: 6px 0 12px; display: grid; gap: 0; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.summary > div + div { border-top: 1px solid var(--line-soft); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: end; }
.summary .amount { font-size: 1.25rem; color: var(--primary); font-variant-numeric: tabular-nums; }
/* מחיר מיוחד: המלא מחוק, המחיר שנגבה גדול, ותווית אדומה כמו במודעה */
.summary > .special { align-items: center; background: #fffbeb; }
.summary .price-box { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.summary .prices { display: flex; align-items: baseline; gap: 10px; }
.summary .was { color: var(--muted); font-weight: 500; font-size: 1rem; text-decoration-color: var(--bad); text-decoration-thickness: 2px; }
.summary .special .amount { font-size: 1.45rem; font-weight: 700; }
.special-tag { background: var(--bad); color: #fff; font-size: .75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.confirm .saving { margin: -4px 0 4px; text-align: center; color: var(--ok); font-size: .9rem; font-weight: 600; }
.confirm .card-title { margin-bottom: 8px; }
/* בית הכנסת: רשימה נפתחת באותו סגנון של שדה החיפוש */
.confirm .field-label { display: block; margin: 16px 0 6px; font-size: 16px; font-weight: 600; color: #2a221e; }
.confirm select {
  width: 100%; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid #cfc3b0; background: #fff;
  font: inherit; font-size: 17px; color: var(--ink);
}
.confirm select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.confirm #group-hint { text-align: start; margin-top: 6px; }
/* טלפון: הכרטיס כמעט לכל הרוחב, ורווחים קטנים — כדי שהחיפוש יופיע גבוה ככל האפשר */
@media (max-width: 480px) {
  .stage { padding: 10px 10px 16px; }
  .sheet { border-radius: 16px; }
  .hero { padding: 16px 16px 0; }
  .hero::after { margin-top: 12px; }
  .page { padding: 16px 18px 24px; }
  .title-block { margin-bottom: 18px; }
  .stepper { margin-bottom: 22px; }
}
.confirm button.primary { margin-top: 14px; border-radius: 14px; }
.confirm button.link { display: block; margin: 10px auto 0; color: var(--primary); }
body.public button.primary:disabled { opacity: .55; }

/* ── דף התודה ─────────────────────────────────────────────────────── */
.thanks { text-align: center; }
.thanks h1 { font-size: 1.5rem; margin-bottom: 6px; }
.thanks .msg { text-align: start; }
.btn-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; margin-top: 8px;
  border-radius: 12px; border: 1.5px solid var(--primary); color: var(--primary); font-weight: 600; text-decoration: none;
}

/* ── פס תחתון בסגנון Stripe: קטן ושקט, אבל קריא ───────────────────── */
.secure {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  background: transparent; color: #4a5263; font-size: .8rem; font-weight: 500;   /* ≈ 7:1 על הרקע */
}
.secure .icon { width: 14px; height: 14px; color: #5b6478; }
.secure .powered { display: inline-flex; align-items: center; gap: 6px; }
.secure .stripe-mark {
  font-family: system-ui, "Segoe UI", Arial, sans-serif; font-weight: 800; font-size: 1rem;
  letter-spacing: -0.03em; color: #635bff; direction: ltr;
}
.secure .sep { width: 1px; height: 12px; background: #d9dce3; margin: 0 6px; }
.secure .methods { color: #5b6478; direction: ltr; }
@media (max-width: 480px) { .secure { gap: 2px 6px; } .secure .sep { display: none; } }   /* בשתי שורות — בלי קו תלוי */

/* דף התשלום לדוגמה (הדגמה בלבד) */
.fake-pay .amount { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 6px 0 14px; }
.fake-pay form + form { margin-top: 8px; }

/* ── תנועה ─────────────────────────────────────────────────────────
   האנימציות רק מוסיפות: בלעדיהן התוכן מוצג כרגיל (fill: backwards בלבד). */
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } }
.sheet.enter { animation: card-in 300ms var(--ease-out) backwards; }
.card.step-in { animation: fade-in 200ms var(--ease-out) backwards; }
.results.reveal { animation: fade-in 180ms var(--ease-out) backwards; }
.results:not(.reveal) .msg { transition: none; }    /* בלי הבהוב כשהרשימה לא השתנתה */

@media (prefers-reduced-motion: reduce) {
  .sheet.enter, .card.step-in, .results.reveal { animation: none; }
  .stepper .dot, .families button, .families .go, body.public .search input { transition: none; }
}

/* ── מחשב: כותרות גדולות יותר ──────────────────────────────────────── */
@media (min-width: 700px) {
  .hero .logo { width: 250px; }
  .hero .brand-title { font-size: 18px; }
  .ornament { font-size: 32px; }
  .title-block { margin-bottom: 26px; }
  .card-title { font-size: 23px; }
}
