/* matching_block — premium dark RTL Hebrew campaign page.
 *
 * Brand colours (primary / primary_strong / accent / bg / text) are CSS custom
 * properties set inline by the template from `campaign.palette`. The dark
 * "premium" neutrals below are the cube's baseline; a campaign goes light/dark
 * purely by its palette bg/text. The big filling ring is the centrepiece.
 */

.mb-scope {
    /* Fallbacks — overridden inline by the template from campaign.palette */
    --mb-primary: #2dd47e;          /* the ring */
    --mb-primary-strong: #1f9e57;
    --mb-accent: #f0a92b;           /* CTA / highlights */
    --mb-bg: #0c111b;               /* page */
    --mb-text: #eef3fa;             /* headings / numbers */

    /* Premium dark neutrals (not from logo) */
    --mb-card: #151c2b;
    --mb-card-2: rgba(255, 255, 255, 0.045);
    --mb-muted: #93a1b8;
    --mb-border: rgba(255, 255, 255, 0.09);
    --mb-track: rgba(255, 255, 255, 0.08);

    --mb-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.35);
    --mb-radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    /* The palette vars live on .mb-scope (a child of body), so body needs its
     * own dark fallbacks — CSS custom properties don't inherit upward. */
    background:
        radial-gradient(1100px 600px at 50% -10%, rgba(45, 212, 126, 0.10), transparent 60%),
        var(--mb-bg, #0c111b);
    background-attachment: fixed;
    color: var(--mb-text, #eef3fa);
    font-family: "Heebo", "Assistant", "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
}

.mb-page { max-width: 1120px; margin: 0 auto; padding: 28px 16px 72px; color: var(--mb-text); }

/* ── org logo strip ─────────────────────────────────────────────── */

.mb-org { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mb-org__logo { height: 48px; width: auto; border-radius: 8px; }
.mb-org__name { font-weight: 700; color: var(--mb-text); }

/* ── hero: the big filling circle is the centrepiece ────────────── */

.mb-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    margin-bottom: 44px;
}
.mb-hero__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--mb-primary);
    background: color-mix(in srgb, var(--mb-primary) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--mb-primary) 35%, transparent);
    box-shadow: 0 0 22px color-mix(in srgb, var(--mb-primary) 22%, transparent);
}
.mb-hero__status::before {
    content: "";
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--mb-primary);
    box-shadow: 0 0 8px var(--mb-primary);
}
.mb-hero__status--closed { color: #f0a92b; background: rgba(240,169,43,.14); border-color: rgba(240,169,43,.35); box-shadow: none; }
.mb-hero__status--closed::before { background: #f0a92b; box-shadow: none; }

.mb-hero__title {
    margin: 2px 0 0;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--mb-text);
}
.mb-hero__subtitle { margin: 0; color: var(--mb-muted); font-size: 1.05rem; }

/* the heart of the page — a large ring that fills with the amount */
.mb-hero__circle {
    position: relative;
    width: clamp(200px, 56vw, 280px);
    aspect-ratio: 1 / 1;
    margin: 6px auto;
}
.mb-hero__circle::after {  /* soft inner glow behind the number */
    content: "";
    position: absolute; inset: 18%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--mb-primary) 14%, transparent), transparent 70%);
}
.mb-donut { width: 100%; height: 100%; transform: rotate(-90deg); position: relative; z-index: 1; }
.mb-donut__track { fill: none; stroke: var(--mb-track); stroke-width: 9; }
.mb-donut__fill {
    fill: none;
    stroke: var(--mb-primary);
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dashoffset 1000ms cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--mb-primary) 70%, transparent));
}
.mb-hero__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16%;
    z-index: 2;
}
.mb-hero__raised {
    font-size: clamp(2.3rem, 9vw, 3.6rem);
    font-weight: 800;
    color: var(--mb-text);
    letter-spacing: -1.5px;
    line-height: 1;
}
.mb-hero__currency { font-size: 0.5em; margin-inline-start: 4px; color: var(--mb-muted); }
.mb-hero__goal { color: var(--mb-muted); font-size: clamp(0.85rem, 2.4vw, 1rem); }
.mb-hero__pct {
    color: var(--mb-primary);
    font-weight: 800;
    font-size: clamp(0.9rem, 2.6vw, 1.1rem);
}

.mb-hero__multiplier {
    display: inline-block;
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-primary-strong));
    color: #04130b;
    padding: 9px 24px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--mb-primary) 30%, transparent);
}

.mb-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mb-accent);
    color: #1a1205;
    text-decoration: none;
    border: 0;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--mb-accent) 35%, transparent);
    transition: filter 120ms, transform 120ms;
    cursor: pointer;
}
.mb-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.mb-cta--hero { padding: 16px 50px; font-size: 1.25rem; }
.mb-cta__icon {
    display: inline-grid; place-items: center;
    background: rgba(0, 0, 0, 0.18);
    width: 28px; height: 28px;
    border-radius: 50%;
    font-weight: 800;
}
.mb-cta--closed {
    background: rgba(240, 169, 43, 0.14);
    color: #f0a92b;
    box-shadow: none;
    cursor: default;
}

/* ── shared card ────────────────────────────────────────────────── */

.mb-countdown, .mb-matchers, .mb-donate, .mb-description {
    background: linear-gradient(180deg, var(--mb-card-2), transparent), var(--mb-card);
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius);
    box-shadow: var(--mb-shadow);
}

/* ── countdown rings ────────────────────────────────────────────── */

.mb-countdown { padding: 24px 28px; margin-bottom: 28px; text-align: center; }
.mb-countdown__title { margin: 0 0 18px; color: var(--mb-text); font-size: 1.2rem; font-weight: 800; }
.mb-countdown__rings { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; }
.mb-ring { position: relative; width: 110px; height: 110px; }
.mb-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mb-ring__track { fill: none; stroke: var(--mb-track); stroke-width: 7; }
.mb-ring__fill {
    fill: none; stroke: var(--mb-accent); stroke-width: 7; stroke-linecap: round;
    transition: stroke-dashoffset 500ms ease;
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--mb-accent) 60%, transparent));
}
.mb-ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mb-ring__value { font-size: 1.8rem; font-weight: 800; color: var(--mb-text); line-height: 1; }
.mb-ring__label { font-size: 0.85rem; color: var(--mb-muted); margin-top: 2px; }

/* ── donor card grid ────────────────────────────────────────────── */

.mb-donor-grid { margin-bottom: 28px; }
.mb-donor-grid__title, .mb-matchers__title, .mb-donate h2 { margin: 0 0 16px; color: var(--mb-text); font-size: 1.2rem; font-weight: 800; }
.mb-donor-grid__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mb-donor-grid__empty {
    grid-column: 1 / -1; text-align: center; color: var(--mb-muted); padding: 28px;
    background: var(--mb-card); border: 1px solid var(--mb-border); border-radius: var(--mb-radius);
}

.mb-donor-card {
    background: var(--mb-card);
    border: 1px solid var(--mb-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--mb-shadow);
    display: flex; flex-direction: column;
}
.mb-donor-card__name {
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-primary-strong));
    color: #04130b;
    padding: 10px 14px;
    font-weight: 800;
    text-align: center;
    font-size: 1rem;
}
.mb-donor-card__body { padding: 18px 14px 16px; text-align: center; }
.mb-donor-card__amount { color: var(--mb-text); font-size: 1.8rem; font-weight: 800; }
.mb-donor-card__amount span { font-size: 1.2rem; color: var(--mb-muted); }
.mb-donor-card__divider { width: 36px; height: 2px; background: var(--mb-border); margin: 12px auto; }
.mb-donor-card__meta { color: var(--mb-muted); font-size: 0.9rem; }
.mb-donor-card__dedication { color: var(--mb-muted); font-size: 0.85rem; margin-top: 6px; }
.mb-donor-card__dedication em { color: var(--mb-text); font-style: normal; margin-inline-end: 4px; }

/* ── matchers ───────────────────────────────────────────────────── */

.mb-matchers { padding: 20px 22px; margin-bottom: 28px; }
.mb-matchers__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mb-matchers__list li {
    padding: 12px 14px;
    background: var(--mb-card-2);
    border: 1px solid var(--mb-border);
    border-radius: 12px;
}
.mb-matchers__name { font-weight: 700; color: var(--mb-text); }
.mb-matchers__amount { float: left; color: var(--mb-primary); font-weight: 800; }
.mb-matchers__note { margin-top: 4px; font-size: 0.85rem; color: var(--mb-muted); }

/* ── donate form ────────────────────────────────────────────────── */

.mb-donate { padding: 24px 26px; margin-bottom: 28px; max-width: 640px; margin-inline: auto; }
.mb-form { display: flex; flex-direction: column; gap: 12px; }
.mb-form__tiers { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mb-tier {
    flex: 1 1 auto; min-width: 84px;
    padding: 11px 12px;
    border: 1px solid var(--mb-border);
    border-radius: 10px;
    background: var(--mb-card-2);
    cursor: pointer;
    font-weight: 700;
    transition: all 120ms;
    color: var(--mb-text);
}
.mb-tier:hover { border-color: var(--mb-primary); color: var(--mb-primary); }
.mb-tier.is-active { background: var(--mb-primary); color: #04130b; border-color: var(--mb-primary); }

.mb-form__row { display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; color: var(--mb-muted); }
.mb-form__row input, .mb-form__row select {
    padding: 11px 12px;
    border: 1px solid var(--mb-border);
    border-radius: 10px;
    font: inherit;
    color: var(--mb-text);
    background: var(--mb-card-2);
}
.mb-form__row input::placeholder { color: var(--mb-muted); }
.mb-form__row input:focus, .mb-form__row select:focus { outline: none; border-color: var(--mb-primary); }
.mb-form__row select option { color: #1a1a1a; }
.mb-form__row--inline { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; }
.mb-form__row--inline span { color: var(--mb-text); }

.mb-form__submit {
    margin-top: 6px;
    background: var(--mb-accent);
    color: #1a1205;
    border: 0;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: filter 120ms;
}
.mb-form__submit:hover { filter: brightness(1.05); }
.mb-form__submit:disabled { opacity: 0.6; cursor: progress; }
.mb-form__error { color: #fb7185; min-height: 1.2em; font-size: 0.95rem; }

.mb-payment-frame { display: flex; flex-direction: column; gap: 0; }
.mb-payment-frame iframe {
    width: 100%;
    min-height: 620px;
    border: 0;
    border-radius: 12px;
    background: #fff;
}

.mb-description { padding: 20px 22px; color: var(--mb-text); }

/* ── thank-you page ─────────────────────────────────────────────── */

.mb-thanks { display: flex; justify-content: center; padding: 80px 16px; }
.mb-thanks__card {
    background: var(--mb-card);
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius);
    box-shadow: var(--mb-shadow);
    padding: 32px 36px;
    text-align: center;
    max-width: 480px;
}
.mb-thanks__card h1 { margin: 0 0 12px; color: var(--mb-text); }
.mb-thanks__lead { color: var(--mb-muted); margin: 0 0 24px; }
.mb-thanks__back {
    display: inline-block;
    margin-top: 12px;
    background: var(--mb-primary);
    color: #04130b;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
}
.mb-thanks__back:hover { filter: brightness(1.05); }
