*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:root {
  --color-primary: #3C0F11;
  --color-primary-cc: #3C0F11CC;
  --color-primary-b3: #3C0F11B3;
  --color-gold: #E9BF7B;
  --color-gold-light: #E9BF7B99;
  --color-cream: #FFF5E7;
  --color-white: #FFFFFF;
  --color-text: #000000;
}
body { font-family: 'Heebo', Arial, sans-serif; direction: rtl; color: var(--color-text); background: var(--color-cream); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: underline; color: inherit; }

/* ==================== SITE HEADER (mabs.co.il) ==================== */
.site-header { position: sticky; top: 0; z-index: 999; background-color: var(--color-primary-b3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); min-height: 10vh; display: flex; align-items: center; padding: 0.5% 5%; }
.header-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
.header-logo img { height: 60px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 0; flex: 1; justify-content: flex-start; margin-right: 20px; }
.header-nav a { color: var(--color-white); text-decoration: none; padding: 8px 14px; font-size: 15px; font-weight: 500; transition: color 0.3s; white-space: nowrap; }
.header-nav a:hover { color: var(--color-gold); }
.header-social { display: flex; align-items: center; gap: 10px; }
.header-social a:not(.header-donate-btn) { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--color-white); text-decoration: none; font-size: 14px; transition: all 0.3s; flex: 0 0 auto; }
.header-social a:not(.header-donate-btn):hover { color: var(--color-gold); }
.header-donate-btn { background: var(--color-gold) !important; color: var(--color-primary) !important; border-radius: 6px; padding: 10px 20px !important; font-weight: 700 !important; font-size: 14px !important; text-decoration: none !important; white-space: nowrap; width: auto !important; height: auto !important; display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 auto; margin-right: 8px; }
.header-donate-btn:hover { background: var(--color-gold-light) !important; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--color-white); font-size: 24px; cursor: pointer; }

/* ==================== SITE FOOTER (mabs.co.il — live, 2026-04-25) ==================== */
/* margin-top of 180px clears the floating logo (which protrudes 80px above
   the footer's top edge) and leaves a comfortable ~100px visible gap between
   the element above (form-container / info-section) and the logo. */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,0.85); padding: 80px 20px 20px; margin-top: 180px; }
.site-footer .footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.site-footer .footer-col { flex: 1; min-width: 180px; }
.site-footer .footer-col h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--color-white); }
.site-footer .footer-col ul { list-style: none; }
.site-footer .footer-col ul li { margin-bottom: 6px; }
.site-footer .footer-col ul li a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: color 0.3s; }
.site-footer .footer-col ul li a:hover { color: var(--color-gold); }
/* Logo "floats" above the footer's top edge thanks to large padding-top + negative margin-top. */
.site-footer .footer-logo { text-align: center; width: 100%; margin: -160px 0 20px; }
.site-footer .footer-logo img { height: 132px; width: auto; }
.site-footer .footer-contact-info { text-align: center; }
.site-footer .footer-contact-info p { margin-bottom: 6px; font-size: 14px; }
.site-footer .footer-contact-info a { color: var(--color-gold-light); text-decoration: none; }
.site-footer .footer-social { display: flex; justify-content: center; gap: 12px; margin: 15px 0; }
.site-footer .footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: var(--color-white); text-decoration: none; transition: background 0.3s; font-size: 16px; }
.site-footer .footer-social a:hover { background: var(--color-gold); color: var(--color-primary); }
.site-footer .footer-bottom { text-align: center; padding-top: 20px; margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 13px; color: rgba(255,255,255,0.5); width: 100%; }
.site-footer .footer-contact-form h3 { font-size: 18px; font-weight: 700; color: var(--color-white); margin-bottom: 10px; }
.site-footer .footer-contact-form input,
.site-footer .footer-contact-form textarea { width: 100%; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; background: rgba(255,255,255,0.1); color: var(--color-white); font-family: 'Heebo', sans-serif; font-size: 14px; margin-bottom: 8px; }
.site-footer .footer-contact-form textarea { height: 60px; resize: vertical; }
.site-footer .footer-contact-form button { background: var(--color-gold); color: var(--color-primary); border: none; padding: 8px 24px; border-radius: 4px; font-weight: 700; cursor: pointer; font-family: 'Heebo', sans-serif; }

@media (max-width: 768px) {
  .header-nav, .header-social { display: none; }
  .mobile-menu-btn { display: block; }
  .site-header { padding: 0.5% 3%; }
  .site-footer .footer-inner { flex-direction: column; }
}

/* Eight header links no longer fit in one row below ~1300px: fold them behind
   the menu button there too, and keep the social icons and donate button. */
@media (min-width: 769px) and (max-width: 1299px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: block; }
}

.hero-section {
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  padding: 28px 0 150px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 32px; width: 90%; margin: 48px auto 0;
  /* Bottom padding (150px) ensures empty space below the last child (subtitle).
     The form-container pulls itself up 102px into that empty area, leaving
     ~48px clearance so subtitle text is never covered. */
}
.hero-section h1 {
  font-family: 'Rubik', 'Heebo', sans-serif; font-size: 52px; font-weight: 900;
  line-height: 1.2em; color: var(--color-primary); margin-top: 16px; margin-bottom: 0;
  white-space: pre-wrap; /* honor newline characters from the editor */
}
/* Centered the same way as .hero-logo / .hero-media. Relying on the
   inherited text-align:center broke wherever an img is display:block
   (e.g. the admin live preview, where Tailwind's preflight sets that) —
   the image hugged the RTL start edge. */
.hero-image { margin: 0 auto; width: 100%; display: flex; justify-content: center; }
/* --hero-scale is set inline per page (payment_pages.hero_image_size / 100,
   default 1). The base 500px cap is the historical size, so scale 1 == the
   old look. The min() keeps a blown-up image inside the hero on any screen. */
.hero-image img {
  max-width: min(calc(500px * var(--hero-scale, 1)), 96%);
  width: 100%;
  height: auto;
}
.hero-logo { margin: 0 auto 16px; display: flex; justify-content: center; }
/* --logo-scale is set inline per page (payment_pages.logo_size / 100, default 1).
   The base 80x240 box is the historical size, so scale 1 == the old look. */
.hero-logo img {
  max-height: calc(80px * var(--logo-scale, 1));
  width: auto;
  max-width: min(calc(240px * var(--logo-scale, 1)), 92%);
  object-fit: contain;
}
.hero-media { margin: 0 auto 20px; display: flex; justify-content: center; }
.hero-media img, .hero-media video { max-width: 500px; width: 100%; height: auto; border-radius: 12px; display: block; }
.info-media { margin: 0 auto 20px; display: flex; justify-content: center; }
.info-media img, .info-media video { max-width: 600px; width: 100%; height: auto; border-radius: 12px; display: block; }
.hero-subtitle {
  font-family: 'Rubik', 'Heebo', sans-serif; font-size: 28px; font-weight: 900;
  color: var(--color-primary); margin-top: 0; margin-bottom: 0;
  white-space: pre-wrap; /* honor newline characters from the editor */
  /* Bottom spacing comes from .hero-section's padding-bottom (150px),
     not from a margin here — that way it can't end up above the text. */
}
.info-section { max-width: 800px; width: 90%; margin: 0 auto 40px; padding: 30px; background: var(--color-white); border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); text-align: center; line-height: 1.8; }
.info-section h2 { font-family: 'Rubik','Heebo',sans-serif; font-size: 22px; font-weight: 800; color: var(--color-primary); margin-bottom: 8px; }
.info-section p { font-size: 15px; color: #555; margin-bottom: 12px; }

.form-container {
  background-color: var(--color-cream); border-radius: 32px;
  box-shadow: 0 0 40px rgba(0,0,0,0.2); max-width: 1012px; width: 80%;
  margin: -102px auto 50px; padding: 28px 24px; position: relative; z-index: 10;
}

.form-card {
  background: var(--color-white); border-radius: 16px; padding: 24px 22px;
  margin-bottom: 16px; box-shadow: 0 2px 12px rgba(60,15,17,0.06);
}
.section-label {
  font-family: 'Rubik', 'Heebo', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--color-primary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.section-label i, .section-label svg { color: var(--color-gold); }
/* an icon that did not load (no network for the icon script) leaves no gap before the label */
.section-label i[data-lucide]:empty { display: none; }
/* a form that opens with the delivery block (no names, no price tiers) does not open with a line */
.form-card > #deliverySection:first-child > .section-divider:first-child { display: none; }
.names-note {
  font-family: 'Heebo', sans-serif; font-size: 12px; font-weight: 400;
  color: #666; margin-inline-start: 8px;
  white-space: pre-wrap; /* honor newline characters from the editor */
}
.names-note * { font-weight: inherit; font-family: inherit; }

/* Template mode — fill cards, previews, thumbnails */
.tpl-fill-list { display: flex; flex-direction: column; gap: 10px; }
.tpl-fill-card {
  /* Template on the LEFT, fields on the RIGHT (RTL page). We rely on
     `direction: ltr` on the grid so column 1 = left physically. */
  direction: ltr;
  display: grid; grid-template-columns: 180px 1fr; gap: 12px;
  padding: 10px; background: #fff; border: 1px solid #e7e0cf; border-radius: 10px;
}
.tpl-fill-card > * { direction: rtl; } /* restore RTL inside each cell */
.tpl-fill-preview { position: relative; }
.tpl-fill-fields { display: flex; flex-direction: column; gap: 6px; }
.tpl-card-head { font-family: 'Rubik','Heebo',sans-serif; font-weight: 700; color: var(--color-primary); font-size: 13px; margin-bottom: 2px; }
.tpl-field-row { display: flex; flex-direction: column; gap: 2px; }
.tpl-field-row label { font-size: 12px; font-weight: 600; color: #333; }
.tpl-field-input {
  width: 100%; padding: 6px 9px; border: 1.5px solid #ccc; border-radius: 7px;
  font-size: 13px; font-family: 'Heebo', sans-serif; background: #fff; outline: none;
}
.tpl-field-input:focus { border-color: var(--color-gold); }
.tpl-preview { position: relative; display: inline-block; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.tpl-preview.size-medium { width: 180px; }
.tpl-preview.size-thumb { width: 100%; }
.tpl-preview.size-big { width: min(900px, 90vw); }
.tpl-preview img { display: block; width: 100%; height: auto; user-select: none; }
.tpl-ph-render {
  position: absolute; box-sizing: border-box;
  line-height: 1.2; white-space: pre-wrap; word-wrap: break-word; pointer-events: none;
}
.tpl-thumbs {
  /* Flex + wrap so a single thumb is actually centered (grid with 3 fixed
     tracks leaves 1 item stuck in the first track). */
  margin: 16px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: 8px; max-width: 400px;
}
.tpl-thumb-wrap { width: 120px; cursor: pointer; border-radius: 8px; overflow: hidden; border: 1px solid #e7e0cf; transition: transform .15s; }
.tpl-thumb-wrap:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.tpl-preview-popup { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.tpl-preview-popup-inner { position: relative; max-width: 95vw; max-height: 95vh; }
.tpl-preview-close { position: absolute; top: -16px; right: -16px; width: 44px; height: 44px; border-radius: 50%; border: none; background: #fff; color: #000; font-size: 32px; line-height: 1; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; padding: 0; z-index: 10; }
@media (max-width: 600px) {
  .tpl-fill-card { direction: rtl; grid-template-columns: 1fr; }
  .tpl-preview.size-medium { width: 100%; max-width: 220px; margin: 0 auto; display: block; }
}
.section-divider { border: none; border-top: 1px solid #f0ebe4; margin: 16px 0; }

.basket-cards { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.basket-card { position: relative; }
.basket-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.basket-card label { display: block; padding: 14px 10px; border: 2px solid #ddd; border-radius: 10px; text-align: center; cursor: pointer; transition: all 0.25s; background: var(--color-white); }
.basket-card label:hover { border-color: var(--color-gold); }
.basket-card input:checked + label { border-color: var(--color-gold); background: linear-gradient(135deg, #FFF9F0, var(--color-cream)); box-shadow: 0 0 0 3px rgba(233,191,123,0.2); }
.basket-card .bc-name { display: block; font-family: 'Rubik', 'Heebo', sans-serif; font-size: 16px; font-weight: 800; color: var(--color-primary); margin-bottom: 2px; }
.basket-card .bc-price { display: block; font-size: 22px; font-weight: 900; color: var(--color-price, var(--color-gold)); font-family: 'Rubik', sans-serif; }
.basket-card .bc-desc { display: block; font-size: 13px; color: #757575; margin-top: 2px; }
/* Fixed-instalment / standing-order options lead with the monthly figure, so
   the real commitment gets this quieter second line right under the price. */
.basket-card .bc-billing { display: block; font-size: 12px; font-weight: 600; color: #8a8a8a; margin-top: 1px; }
.basket-card input:checked + label .bc-billing { color: inherit; opacity: .8; }
/* Price-per-name tiers (names mode). Styled after the old WordPress form at
   ravbenayahu.co.il/forms/pidyon_nefesh_yomi: compact pills sized to their
   text, gold gradient by default, flipping to the dark maroon gradient when
   picked. Overrides the .basket-card card look, so every property the card
   rules set (border, background, box-shadow, bc-* colors) is restated here. */
/* Equal cards, whatever the text. These were pills that took their width from
   their own label, so "פדיון נפש לערב ראש השנה בלבד" and "…וגם לערב יום
   הכיפורים" came out visibly different sizes and read as different kinds of
   thing rather than two prices for the same one.
   A grid of 1fr columns fixes the width; align-items:stretch plus
   grid-auto-rows:1fr fixes the height, so a longer label wraps inside a card
   that stays the same size as its neighbour. */
.basket-cards.names-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 10px;
}
.names-tiers .basket-card { display: flex; }
.names-tiers .basket-card label {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, #E9BF7B 0%, #F5D5A6 100%);
  color: var(--color-primary);
  text-align: center;
}
.names-tiers .basket-card label:hover { filter: brightness(1.05); border-color: transparent; }
.names-tiers .basket-card input:checked + label {
  background: linear-gradient(90deg, #3C0F11 0%, #881811 100%);
  border-color: transparent;
  box-shadow: none;
  color: #F5D5A6;
}
/* The name leads and the price answers it, so the name is set first and the
   figure carries the weight underneath. */
.names-tiers .bc-desc {
  order: 1; font-size: 14.5px; font-weight: 600; color: inherit;
  opacity: .92; line-height: 1.35; margin: 0; text-wrap: balance;
}
.names-tiers .bc-price {
  order: 2; font-size: 22px; font-weight: 800; color: inherit;
  margin: 0; line-height: 1.1; white-space: nowrap;
}

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.qty-row .qty-label { font-size: 15px; font-weight: 600; }
.nice-number { display: inline-flex; align-items: center; direction: ltr; }
.nice-number button { width: 34px; height: 34px; border: 2px solid var(--color-primary); background: transparent; color: var(--color-primary); font-size: 20px; font-weight: 700; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.nice-number button:hover { color: var(--color-cream); background: var(--color-primary); }
.nice-number button.minus { border-radius: 8px 0 0 8px; }
.nice-number button.plus { border-radius: 0 8px 8px 0; }
.nice-number input { width: 50px !important; height: 34px; border: 2px solid var(--color-primary); border-left: none; border-right: none; text-align: center; font-size: 18px; font-weight: 700; font-family: 'Heebo', sans-serif; color: var(--color-primary); background: transparent; -moz-appearance: textfield; outline: none; }
.nice-number input::-webkit-outer-spin-button, .nice-number input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.names-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.names-header .names-label { font-size: 15px; font-weight: 600; }
.names-header .names-limit { font-size: 12px; color: #999; background: #f0f0f0; padding: 2px 10px; border-radius: 10px; }
.name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.name-row input { flex: 1; padding: 8px 12px; border: 1.5px solid #ccc; border-radius: 8px; font-size: 14px; font-family: 'Heebo', sans-serif; color: var(--color-primary); background: var(--color-white); outline: none; transition: border-color 0.2s; }
.name-row input:focus { border-color: var(--color-gold); }
.remove-name-btn { width: 30px; height: 30px; border: none; background: #eee; color: #c00; border-radius: 50%; font-size: 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.remove-name-btn:hover { background: #fdd; }
.add-name-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1.5px dashed var(--color-gold); color: var(--color-primary); padding: 8px 18px; border-radius: 8px; font-family: 'Heebo', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.add-name-btn:hover { background: var(--color-cream); border-style: solid; }
.add-name-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Yahrzeit name rows (חודש/יום פטירה) — only rendered when the page has
   names_yahrzeit_enabled, so every other names page is untouched. The row
   wraps instead of squeezing: name on its own line, the two pickers beside
   each other, and the remove button pinned to the end on both layouts. */
.name-row.yz-row { flex-wrap: wrap; gap: 6px 8px; margin-bottom: 14px; }
.name-row.yz-row input[type="text"] { flex: 1 1 100%; }
.name-row.yz-row .yz-select { flex: 1 1 0; min-width: 0; padding: 8px 10px; border: 1.5px solid #ccc; border-radius: 8px; font-size: 13.5px; font-family: 'Heebo', sans-serif; color: var(--color-primary); background: var(--color-white); outline: none; cursor: pointer; transition: border-color 0.2s; }
.name-row.yz-row .yz-select:focus { border-color: var(--color-gold); }
.name-row.yz-row .yz-select:invalid, .name-row.yz-row .yz-select option[value=""] { color: #999; }
@media (max-width: 480px) {
  .name-row.yz-row .yz-select { flex: 1 1 calc(50% - 23px); font-size: 13px; }
}

.option-group { display: flex; flex-wrap: wrap; gap: 10px; }
.option-pill { position: relative; }
.option-pill input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.option-pill label { display: inline-block; padding: 8px 16px; border: 1.5px solid #ddd; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--color-text); cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.option-pill label:hover { border-color: var(--color-gold); }
.option-pill input:checked + label { border-color: var(--color-gold); background: linear-gradient(135deg, #FFF9F0, var(--color-cream)); color: var(--color-primary); font-weight: 600; }

.bf-row { margin-bottom: 10px; }
.bf-row label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 3px; }
.bf-row label .required { color: #c00; }
.bf-row .optional { font-weight: 400; color: #757575; font-size: 13px; }
.bf-row input, .bf-row textarea { width: 100%; padding: 8px 12px; border: 1.5px solid #ccc; border-radius: 8px; font-size: 14px; font-family: 'Heebo', sans-serif; background: var(--color-white); outline: none; transition: border-color 0.2s; }
.bf-row input:focus, .bf-row textarea:focus { border-color: var(--color-gold); }
.bf-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.summary-strip { background: linear-gradient(135deg, #FFF9F0, var(--color-cream)); border: 1.5px solid var(--color-gold); border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.summary-detail { font-size: 14px; color: #888; margin-bottom: 6px; }
.summary-total-line { display: flex; justify-content: space-between; align-items: center; font-family: 'Rubik', 'Heebo', sans-serif; font-size: 14px; font-weight: 600; color: var(--color-primary); }
.summary-amount { font-size: 18px; font-weight: 800; color: var(--color-primary); }

.payment-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.payment-methods-label { text-align: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.pay-method-option { position: relative; }
.pay-method-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.pay-method-option label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border: 2px solid #ddd; border-radius: 10px; background: var(--color-white); font-family: 'Heebo', sans-serif; font-size: 14px; font-weight: 600; color: var(--color-text); cursor: pointer; transition: all 0.25s; text-align: center; min-height: 60px; }
.pay-method-option label:hover { border-color: var(--color-gold); }
.pay-method-option input:checked + label { border-color: var(--color-gold); background: linear-gradient(135deg, #FFF9F0, var(--color-cream)); box-shadow: 0 0 0 3px rgba(233,191,123,0.2); }

.donate-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 16px; background: linear-gradient(135deg, var(--color-gold) 0%, #d4a843 100%); color: var(--color-primary); font-family: 'Rubik', 'Heebo', sans-serif; font-size: 22px; font-weight: 800; border: none; border-radius: 12px; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(233,191,123,0.4); gap: 8px; }
.donate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(233,191,123,0.5); }
.donate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.payment-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 99999; justify-content: center; align-items: center; padding: 20px; }
.payment-overlay.active { display: flex; }
.payment-popup { background: #fff; border-radius: 12px; width: 100%; max-width: 550px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.4); position: relative; }
.payment-popup-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--color-primary); color: #fff; }
.payment-popup-header h4 { font-size: 16px; font-weight: 600; margin: 0; }
.payment-popup-close { background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; padding: 0 4px; opacity: 0.8; }
.payment-popup-close:hover { opacity: 1; }
.payment-popup iframe { width: 100%; flex: 1; min-height: 340px; border: none; }
.payment-popup-actions {
  padding: 12px 16px; border-top: 1px solid #eee; background: #fafafa;
  display: flex; flex-direction: column; gap: 8px;
}
.payment-popup-err {
  background: #fee; color: #c33; padding: 8px 10px; border-radius: 6px;
  font-size: 13px; text-align: center;
}
.payment-popup-pay {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--color-gold) 0%, #d4a843 100%);
  color: var(--color-primary); font-family: 'Rubik','Heebo',sans-serif;
  font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 15px rgba(233,191,123,0.4); transition: all 0.2s;
}
.payment-popup-pay:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(233,191,123,0.5); }
.payment-popup-pay:disabled { opacity: 0.6; cursor: wait; }
.payment-popup-summary {
  padding: 12px 18px; border-bottom: 1px solid #eee; background: #fbf7f0; text-align: center;
}
.payment-popup-summary .pps-name { font-size: 14px; font-weight: 600; color: #444; margin-bottom: 2px; }
.payment-popup-summary .pps-amt  { font-size: 20px; font-weight: 800; color: var(--color-primary); line-height: 1.3; }
.payment-popup-summary .pps-note { font-size: 13px; font-weight: 600; color: #555; margin-top: 3px; }
.payment-popup-summary .pps-hint { font-size: 12px; color: #888; margin-top: 7px; }
.payment-popup-loading { display: flex; align-items: center; justify-content: center; padding: 60px 20px; font-size: 16px; color: #555; gap: 10px; }
.payment-popup-loading .spin { width: 24px; height: 24px; border: 3px solid #ddd; border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#customAmountRow { display: none; margin-bottom: 14px; }
#customAmountRow input { width: 100%; padding: 10px 12px; border: 1.5px solid #ccc; border-radius: 8px; font-size: 16px; font-family: 'Heebo', sans-serif; outline: none; }
#customAmountRow input:focus { border-color: var(--color-gold); }

.benefits-text { text-align: center; font-size: 1.2em; line-height: 1.9; color: var(--color-primary); margin-bottom: 24px; padding: 0 10px; }
.benefits-text strong { font-weight: 700; }
.two-col-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.address-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.address-fields.show { display: grid; }
.ac-wrap { position: relative; }
.ac-wrap label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 3px; }
.ac-wrap input { width: 100%; padding: 8px 12px; border: 1.5px solid #ccc; border-radius: 8px; font-size: 14px; font-family: 'Heebo', sans-serif; outline: none; }
.ac-wrap input:focus { border-color: var(--color-gold); }
.ac-list { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1.5px solid var(--color-gold); border-radius: 0 0 8px 8px; max-height: 180px; overflow-y: auto; z-index: 100; }
.ac-list.show { display: block; }
.ac-list div { padding: 8px 12px; cursor: pointer; font-size: 13px; }
.ac-list div:hover, .ac-list div.ac-active { background: var(--color-cream); }
.ac-list div.ac-hint { color: #999; font-size: 12px; cursor: default; font-style: italic; }
.ac-list div.ac-hint:hover { background: #fff; }
.terms-inline { margin-bottom: 16px; }
.terms-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.terms-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-primary); flex-shrink: 0; }
.terms-check label { font-size: 13px; cursor: pointer; color: #666; }
.terms-check a { color: var(--color-primary); font-weight: 600; }
.terms-check .required { color: #c00; font-weight: 700; }
.terms-box-scroll { max-height: 150px; overflow-y: auto; padding: 12px; background: #f9f5ef; border-radius: 8px; font-size: 12px; line-height: 1.8; color: #666; }
.terms-box-scroll ol { padding-right: 16px; }
.terms-box-scroll ol li { margin-bottom: 3px; }
.video-section { max-width: 800px; margin: 0 auto 40px; padding: 0 20px; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

@media (max-width: 768px) {
  .hero-section { width: 100%; margin: 0; border-radius: 0 0 32px 32px; padding: 20px 10px; }
  .hero-section h1 { font-size: 32px; }
  .hero-subtitle { font-size: 18px; }
  .hero-image img { max-width: min(calc(300px * var(--hero-scale, 1)), 96%); }
  .info-section { width: 95%; }
  .form-container { width: 100%; border-radius: 0; margin-top: 0; padding: 12px; box-shadow: none; }
  .bf-inline { grid-template-columns: 1fr; }
  .two-col-section { grid-template-columns: 1fr; gap: 10px; }
  .address-fields { grid-template-columns: 1fr; }
  .benefits-text { font-size: 1.1em; }
  .basket-cards { grid-template-columns: 1fr 1fr 1fr; }
  /* Two long Hebrew labels side by side at 390px leave three words per line;
     stacked they stay one column wide and grid-auto-rows keeps them identical. */
  .basket-cards.names-tiers { grid-template-columns: 1fr; }
  /* A monthly option's face is a sentence, not a number — three of those in a
     99px column wraps to three lines. Only pages using those modes get this. */
  .basket-cards.has-billing { grid-template-columns: 1fr; }
  .names-tiers .basket-card label { padding: 13px 14px; }
  .names-tiers .bc-desc { font-size: 14px; }
  .names-tiers .bc-price { font-size: 21px; }
  .hero-subtitle { margin-bottom: 20px; }
  .payment-popup { max-width: 100%; max-height: 100vh; border-radius: 0; height: 100%; }
  .payment-overlay { padding: 0; }
}
/* ==================== THANK-YOU PAGE (/pay/:slug/success) ====================
   The success page reuses this file so it reads as the same page the donor
   just filled in — same header, hero, cream container and footer. Only the
   inner card is different: no form, just the wording the admin set per page
   (success_text / success_body_html / success_button_text). */
.ty-card { text-align: center; padding: 40px 28px 36px; }
.ty-badge {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 18px rgba(60,15,17,0.18);
}
.ty-badge i, .ty-badge svg {
  width: 40px; height: 40px; color: var(--color-primary); stroke-width: 3;
}
.ty-title {
  font-family: 'Rubik', 'Heebo', sans-serif; font-size: 30px; font-weight: 900;
  line-height: 1.3; color: var(--color-primary); margin-bottom: 14px;
  white-space: pre-wrap; /* honor newlines from the editor */
}
.ty-body { font-size: 17px; color: #444; line-height: 1.85; margin-bottom: 26px; }
.ty-body > *:last-child { margin-bottom: 0; }
.ty-body p { margin-bottom: 10px; }
.ty-body h2 { font-family: 'Rubik','Heebo',sans-serif; font-size: 22px; font-weight: 800; color: var(--color-primary); margin: 18px 0 8px; }
.ty-body h3 { font-family: 'Rubik','Heebo',sans-serif; font-size: 18px; font-weight: 700; color: var(--color-primary); margin: 14px 0 6px; }
.ty-body a { color: var(--color-primary); text-decoration: underline; }
.ty-body ul, .ty-body ol { padding-inline-start: 22px; margin: 10px 0; text-align: start; display: inline-block; }
.ty-body li { margin-bottom: 4px; }
.ty-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0; }
.ty-body iframe { max-width: 100%; border-radius: 12px; }
.ty-btn {
  display: inline-block; padding: 14px 40px; border-radius: 10px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-cc) 100%);
  color: var(--color-gold); font-family: 'Rubik','Heebo',sans-serif;
  font-size: 17px; font-weight: 700; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(60,15,17,0.25);
}
.ty-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(60,15,17,0.32); }

@media (max-width: 768px) {
  .ty-card { padding: 30px 18px 28px; }
  .ty-title { font-size: 24px; }
  .ty-body { font-size: 16px; }
  .ty-badge { width: 64px; height: 64px; }
  .ty-badge i, .ty-badge svg { width: 32px; height: 32px; }
  .ty-btn { padding: 13px 32px; font-size: 16px; width: 100%; }
}

/* Thank-you hero: logo + title only. Shorter than the payment page's hero
   (which has 150px of bottom padding to hide the form-container's -102px pull)
   because there is no tall form to tuck under it. */
.ty-hero { padding: 32px 20px 128px; }
.ty-hero h1 { font-size: 40px; }
.ty-art { padding: 18px; }
@media (max-width: 768px) { .ty-hero h1 { font-size: 27px; } }

/* ==================== DONOR SELF-SERVICE (/n/:token) ==================== */
.ed-sub { font-size: 14px; color: #666; margin-bottom: 12px; }
.ed-note { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.6; border-radius: 10px; padding: 12px 14px; }
.ed-note i, .ed-note svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.ed-note-ok { background: rgba(233,191,123,.18); color: var(--color-primary); }
.ed-note-closed { background: #f3f3f3; color: #555; }
.ed-note a { color: inherit; font-weight: 700; }
.ed-card { border: 1px solid rgba(60,15,17,.12); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.ed-card-h { font-family: 'Rubik','Heebo',sans-serif; font-weight: 700; font-size: 14px; color: var(--color-primary); margin-bottom: 10px; }
.ed-row { margin-bottom: 12px; }
.ed-row label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 4px; }
.ed-input { width: 100%; padding: 10px 12px; border: 1px solid rgba(60,15,17,.2); border-radius: 8px;
  font-family: 'Heebo', sans-serif; font-size: 16px; background: #fff; color: #000; }
.ed-input:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(233,191,123,.3); }
.ed-input-custom { margin-top: 6px; }
.ed-ro { padding: 10px 12px; background: #faf7f2; border-radius: 8px; font-size: 16px; color: #333; }
.ed-empty { font-size: 14px; color: #777; }
.ed-save { width: 100%; margin-top: 6px; padding: 14px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-cc) 100%);
  color: var(--color-gold); font-family: 'Rubik','Heebo',sans-serif; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.ed-save:disabled { opacity: .6; cursor: default; }
.ed-save i, .ed-save svg { width: 18px; height: 18px; }
.ed-msg { margin: 12px 0 0; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.ed-msg-ok { background: #e8f6ec; color: #1d6b33; }
.ed-msg-err { background: #fdecea; color: #a12a1e; }
.ed-add-card { text-align: center; }
.ed-add-text { font-size: 15px; color: #444; line-height: 1.7; margin-bottom: 14px; }
.ed-add-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 34px; border-radius: 10px; text-decoration: none;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  color: var(--color-primary); font-family: 'Rubik','Heebo',sans-serif; font-size: 16px; font-weight: 700; }
.ed-add-btn i, .ed-add-btn svg { width: 18px; height: 18px; }

/* Banner shown on the payment page when it was opened as ?add=<token>. */
.add-banner { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px;
  background: rgba(233,191,123,.22); border: 1px solid rgba(233,191,123,.6);
  border-radius: 12px; padding: 13px 15px; }
.add-banner i, .add-banner svg { width: 20px; height: 20px; color: var(--color-primary); flex: 0 0 auto; margin-top: 1px; }
.add-banner strong { display: block; font-family: 'Rubik','Heebo',sans-serif; font-size: 15px; color: var(--color-primary); }
.add-banner span { font-size: 13.5px; color: #555; line-height: 1.6; }
.form-card input.prefilled { background: #f7f4ef; color: #555; }

@media (max-width: 768px) {
  .ed-add-btn, .ed-save { width: 100%; }
}

/* ==================== THANK-YOU PAGE BLOCK BUILDER ====================
   Only pages whose success_blocks list is non-empty render these; a page that
   still uses the legacy success_text/success_body_html layout never sees one
   of these classes. Everything below is additive — no existing rule changes.
   The admin's live preview loads this same stylesheet in its iframe, so what
   the owner arranges is literally what the donor gets. */
.ty-blocks > *:last-child { margin-bottom: 0; }

/* h3-level heading block. .ty-title carries the family/colour; this only
   scales it down, so a colour or size set per block still wins over it. */
.ty-title-sm { font-size: 21px; font-weight: 800; margin-bottom: 10px; }

/* Image block. The width the admin picked is an inline style on the <img>. */
.ty-b-img { margin: 14px 0 20px; }
.ty-b-img img { max-width: 100%; height: auto; border-radius: 12px; vertical-align: middle; }
.ty-b-img a { display: inline-block; }

/* Video block — 16:9, same rounding as the payment page's video section. */
.ty-b-video {
  position: relative; width: 100%; margin: 16px 0 22px;
  border-radius: 12px; overflow: hidden; background: #000;
  aspect-ratio: 16 / 9;
}
.ty-b-video iframe, .ty-b-video video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}

.ty-b-divider {
  height: 1px; margin: 22px auto; max-width: 320px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}
.ty-b-spacer { width: 100%; }

/* Buttons block. One item looks exactly like the legacy single .ty-btn;
   several sit in a row and wrap on their own when the card gets narrow. */
.ty-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 6px; }
.ty-btn-outline {
  background: transparent; color: var(--color-primary);
  border: 2px solid var(--color-primary); box-shadow: none;
}
.ty-btn-outline:hover { box-shadow: 0 6px 16px rgba(60,15,17,0.18); }

/* Order summary — the donor's own record, shown only when the thank-you URL
   carried their token. Deliberately quiet: it is a receipt, not a headline. */
.ty-summary {
  text-align: start; background: var(--color-cream);
  border: 1px solid var(--color-gold-light); border-radius: 12px;
  padding: 18px 20px; margin: 18px 0 22px;
}
.ty-sum-title {
  font-family: 'Rubik','Heebo',sans-serif; font-size: 17px; font-weight: 800;
  color: var(--color-primary); margin-bottom: 10px;
}
.ty-sum-row {
  display: flex; gap: 10px; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px dashed rgba(60,15,17,0.12);
  font-size: 15.5px; color: #444;
}
.ty-sum-row:last-of-type { border-bottom: 0; }
.ty-sum-k { font-weight: 600; color: #666; flex: 0 0 auto; }
.ty-sum-v { font-weight: 700; color: var(--color-primary); text-align: start; }
.ty-sum-names { margin-top: 12px; }
.ty-sum-names-label { font-weight: 700; color: #666; font-size: 14.5px; margin-bottom: 6px; }
.ty-sum-names ol { padding-inline-start: 22px; margin: 0; }
.ty-sum-names li { font-size: 15.5px; color: var(--color-primary); font-weight: 600; margin-bottom: 3px; }
.ty-sum-edit {
  display: inline-block; margin-top: 12px; font-size: 14.5px; font-weight: 600;
  color: var(--color-primary); text-decoration: underline;
}

@media (max-width: 768px) {
  /* The legacy rule makes a lone .ty-btn full width. Inside a buttons block
     that has to become "full width per row" instead, or two buttons would
     fight over one line. */
  .ty-btns .ty-btn { width: 100%; flex: 1 1 100%; }
  .ty-title-sm { font-size: 18px; }
  .ty-summary { padding: 14px 15px; }
  .ty-sum-row { flex-direction: column; gap: 2px; }
}
