/**
 * Bazeh Rewards — frontend styles
 * Covers: My Account panels, checkout block, product-page shortcode,
 * balance card, gift grid, convert-to-coupon form.
 *
 * Uses the same Vazirmatn stack as the analytics panel so typography
 * matches the rest of the plugin.
 */

.bzh-rw {
    font-family: Vazirmatn, Tahoma, 'Iran Sans', system-ui, sans-serif;
    color: #1f2937;
    direction: rtl;
}

.bzh-rw * {
    box-sizing: border-box;
}

/* ─ Hero / balance card ────────────────────────────────────────────
   All text inside the hero is forced white to avoid themes applying
   their heading/link colors (some Elementor themes paint h2 green
   which made "0" illegible on the blue gradient). */

.bzh-rw-hero {
    position: relative;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #8b5cf6 100%);
    color: #fff;
    border-radius: 18px;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    margin-bottom: 24px;
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.28);
    overflow: hidden;
}
.bzh-rw-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 65%);
    pointer-events: none;
}
.bzh-rw-hero.bzh-rw-tier-silver {
    background: linear-gradient(135deg, #64748b 0%, #475569 50%, #334155 100%);
}
.bzh-rw-hero.bzh-rw-tier-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 60%, #dc2626 100%);
    box-shadow: 0 14px 40px rgba(239, 68, 68, 0.32);
}

/* Force white text/link for every child of the hero — themes often
   colour h2/a/p separately with their own !important so we scope under
   .bzh-rw to win on specificity and hard-override. The extra selectors
   target commonly overridden elements (h1-h3, a visited, woocommerce
   price spans) in case the theme sets them with their own !important. */
.bzh-rw .bzh-rw-hero,
.bzh-rw .bzh-rw-hero h1,
.bzh-rw .bzh-rw-hero h2,
.bzh-rw .bzh-rw-hero h3,
.bzh-rw .bzh-rw-hero p,
.bzh-rw .bzh-rw-hero span,
.bzh-rw .bzh-rw-hero strong,
.bzh-rw .bzh-rw-hero a,
.bzh-rw .bzh-rw-hero a:hover,
.bzh-rw .bzh-rw-hero a:visited,
.bzh-rw .bzh-rw-hero .amount,
.bzh-rw .bzh-rw-hero .woocommerce-Price-amount {
    color: #ffffff !important;
    text-decoration: none;
}
/* Extra-bold override specifically for the balance number because
   some themes style `.woocommerce h2` or `h2.entry-title` with their
   own !important colour + text-shadow that fights the generic rule. */
.bzh-rw .bzh-rw-hero h2.bzh-rw-hero-balance,
.bzh-rw-hero .bzh-rw-hero-balance {
    color: #ffffff !important;
    background: transparent !important;
    -webkit-text-fill-color: #ffffff !important; /* beats theme gradient-text */
}

.bzh-rw-hero-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.bzh-rw-hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82) !important;
    margin-bottom: 10px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    align-self: flex-start;
}

.bzh-rw-hero-balance-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 8px;
    flex-wrap: wrap;
}
.bzh-rw-hero-balance {
    font-size: 46px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.bzh-rw-hero-unit {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88) !important;
}
.bzh-rw-hero-sub {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92) !important;
}
.bzh-rw-hero-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75) !important;
}

.bzh-rw-tier-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    margin-top: 4px;
    backdrop-filter: blur(6px);
}
.bzh-rw-tier-name { font-size: 18px; font-weight: 700; }
.bzh-rw-tier-mult { font-size: 13px; color: rgba(255, 255, 255, 0.92) !important; margin-top: 4px; }

.bzh-rw-tier-progress { margin-top: 16px; }
.bzh-rw-tier-bar {
    background: rgba(255, 255, 255, 0.22);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
}
.bzh-rw-tier-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.85));
    border-radius: 999px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.bzh-rw-tier-remaining {
    margin: 10px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92) !important;
}
.bzh-rw-tier-remaining strong { color: #fff !important; font-weight: 700; }

.bzh-rw-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    color: #78350f;
    font-size: 13.5px;
}
.bzh-rw-warning strong { color: #b45309; font-weight: 700; }
.bzh-rw-warning-icon { flex-shrink: 0; color: #d97706; margin-top: 2px; }

/* ── Thin promo banner (always visible when credits > 0) ──────────── */
.bzh-rw-promo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 0 0 16px;
    border-radius: 12px;
    background: linear-gradient(95deg, #eef2ff 0%, #ecfeff 100%);
    border: 1px solid #c7d2fe;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.8;
}
.bzh-rw-promo-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #fff;
    color: #6366f1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.bzh-rw-promo-text { flex: 1 1 auto; font-weight: 500; }
.bzh-rw-promo-text strong { color: #4338ca; font-weight: 700; }
.bzh-rw-promo-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #4338ca;
    color: #fff !important;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}
.bzh-rw-promo-cta:hover { background: #3730a3; transform: translateY(-1px); }
@media (max-width: 560px) {
    .bzh-rw-promo { flex-wrap: wrap; padding: 12px; }
    .bzh-rw-promo-text { flex: 1 1 100%; order: 2; font-size: 12.5px; }
    .bzh-rw-promo-icon { order: 1; }
    .bzh-rw-promo-cta { order: 3; margin-inline-start: auto; }
}

/* ── Days-until-expiry chip for the transactions table ────────────── */
.bzh-rw-col-expiry { white-space: nowrap; text-align: center; }
.bzh-rw-expiry-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    border: 1px solid transparent;
}
.bzh-rw-expiry-chip small {
    font-size: 10.5px;
    font-weight: 500;
    opacity: 0.85;
}
.bzh-rw-expiry-chip--ok      { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.bzh-rw-expiry-chip--warn    { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.bzh-rw-expiry-chip--danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.bzh-rw-expiry-chip--expired { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.bzh-rw-expiry-chip--used    { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.bzh-rw-muted { color: #94a3b8; }

@media (max-width: 720px) {
    .bzh-rw-hero {
        grid-template-columns: 1fr;
        padding: 22px;
        gap: 20px;
    }
    .bzh-rw-hero-balance { font-size: 38px; }
    .bzh-rw-hero-unit { font-size: 15px; }
}

.bzh-rw-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bzh-rw-card-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}
.bzh-rw-card-desc {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.8;
}
.bzh-rw-empty {
    color: #9ca3af;
    padding: 12px 0;
    text-align: center;
}

/* ── Convert-credits card (my-account → credits tab) ───────────────
   Converts اعتبار into a one-time coupon. Designed as a card with a
   clear header, labelled input, contextual helpers (max + rate), and
   a gradient submit button matching the rest of the rewards UI. */
.bzh-rw-convert-card {
    padding: 20px 22px;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 70%, #eef2ff 100%);
    border: 1px solid #e9d5ff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.08);
}
.bzh-rw-convert-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.bzh-rw-convert-head-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.28);
}
.bzh-rw-convert-card .bzh-rw-card-title { margin: 0 0 4px; font-size: 16px; color: #1f1b4d; }
.bzh-rw-convert-card .bzh-rw-card-desc { margin: 0; font-size: 13px; color: #4b5563; line-height: 1.8; }
.bzh-rw-convert-card .bzh-rw-card-desc strong { color: #6366f1; font-weight: 700; }

/* Convert-to-coupon form. Layout:
     [ label ]
     [ input field ] ← [ submit button ]  (same baseline, same height)
     [ hint ]
   Pulling the hint out of the input column lets the button align with
   the input itself instead of sitting below the hint paragraph. */
.bzh-rw-convert {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
/* Legacy .bzh-rw-convert-field kept for backward compatibility if
   another view still uses it — but the credits view now uses
   .bzh-rw-convert-row (below) which gives us proper input/button
   vertical alignment. */
.bzh-rw-convert-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bzh-rw-convert-row {
    display: flex;
    align-items: stretch; /* input & button share the same height */
    gap: 10px;
    flex-wrap: wrap;
}
.bzh-rw-convert-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #1f1b4d;
}
.bzh-rw-convert-input-wrap {
    position: relative;
    flex: 1 1 240px;
    min-width: 0;
}
.bzh-rw-convert-input-wrap input[type="number"] {
    width: 100%;
    height: 48px;          /* matches .bzh-rw-convert-submit so both line up */
    padding: 12px 60px 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-appearance: textfield;
}
.bzh-rw-convert-input-wrap input[type="number"]::-webkit-outer-spin-button,
.bzh-rw-convert-input-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.bzh-rw-convert-input-wrap input[type="number"]:focus {
    outline: 0;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.bzh-rw-convert-input-unit {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    padding: 4px 9px;
    border-radius: 6px;
    pointer-events: none;
}
.bzh-rw-convert-hint {
    font-size: 11.5px;
    color: #6b7280;
    line-height: 1.7;
}
.bzh-rw-convert-hint strong { color: #374151; font-weight: 700; }
.bzh-rw-convert-hint-sep { margin: 0 6px; color: #c7d2fe; }
.bzh-rw-convert-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;          /* matches the adjacent input */
    min-height: 48px !important;
    padding: 0 22px !important;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
}
.bzh-rw-convert-submit svg { transition: transform 0.2s ease; }
.bzh-rw-convert-submit:hover svg { transform: translateX(-4px); } /* RTL: arrow points inward */

.bzh-rw-convert-preview {
    margin: 12px 0 0;
    font-size: 13px;
    color: #4b5563;
    min-height: 20px;
}
.bzh-rw-convert-preview:not(:empty) {
    padding: 10px 14px;
    background: #eef2ff;
    border-radius: 8px;
    color: #4338ca;
    font-weight: 600;
}

.bzh-rw-convert-result { margin-top: 12px; }
.bzh-rw-convert-success {
    padding: 16px 18px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #6ee7b7;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.14);
}
.bzh-rw-convert-success-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #065f46;
    font-size: 14.5px;
    margin-bottom: 10px;
}
.bzh-rw-convert-success-code {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
}
.bzh-rw-convert-success-label {
    font-size: 12px;
    color: #6b7280;
}
.bzh-rw-convert-success-code code {
    direction: ltr;
    font-size: 16px;
    font-weight: 800;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 8px;
    color: #111827;
    letter-spacing: 0.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bzh-rw-copy-btn {
    margin-inline-start: auto;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.bzh-rw-copy-btn:hover { background: #c7d2fe; }
.bzh-rw-convert-success-meta {
    font-size: 13px;
    color: #065f46;
}
.bzh-rw-convert-success-meta strong { color: #047857; }
.bzh-rw-convert-error {
    margin: 0;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
}

/* ── Pill buttons — unified modern language ──────────────────────
   Used by the redeem block, convert card, and generic CTAs. All
   variants share the same height, radius, and font metrics so they
   line up when placed next to each other in a button row.

   DEFENSIVE CSS STRATEGY
   ──────────────────────
   The host theme (and WooCommerce's own stylesheet) apply aggressive
   `!important` rules to `.woocommerce a.button`, `button.button`,
   input[type=submit], etc. — they paint pink/red borders, transparent
   backgrounds, and slate text. If we don't fight back with matching
   `!important` declarations on both `a` and `button` elements, our
   buttons end up as "white text on white background" (invisible) or
   "indigo text on pink outline" (off-brand).

   So every visual property (background, border, color, shadow) gets
   `!important`, and we list `button.bzh-rw-btn`, `a.bzh-rw-btn`,
   `input.bzh-rw-btn` explicitly so tag-based theme selectors can't
   out-specificity us. */
.bzh-rw-btn,
a.bzh-rw-btn,
a.bzh-rw-btn:link,
a.bzh-rw-btn:visited,
button.bzh-rw-btn,
input.bzh-rw-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 22px;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-decoration: none !important;
    text-shadow: none !important;
    font-family: Vazirmatn, Tahoma, 'Iran Sans', system-ui, sans-serif !important;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.bzh-rw-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28) !important;
}
.bzh-rw-btn:disabled,
.bzh-rw-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Primary — filled indigo pill. The `-webkit-text-fill-color` override
   defeats themes that paint link text with a gradient / background-clip
   trick (otherwise the label vanishes on Safari/Chrome). */
.bzh-rw-btn.bzh-rw-btn--primary,
a.bzh-rw-btn.bzh-rw-btn--primary,
a.bzh-rw-btn.bzh-rw-btn--primary:link,
a.bzh-rw-btn.bzh-rw-btn--primary:visited,
button.bzh-rw-btn.bzh-rw-btn--primary,
input.bzh-rw-btn.bzh-rw-btn--primary {
    background-color: #6366f1 !important;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.02)) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28), inset 0 -2px 0 rgba(0,0,0,0.08) !important;
}
.bzh-rw-btn.bzh-rw-btn--primary:hover,
a.bzh-rw-btn.bzh-rw-btn--primary:hover,
a.bzh-rw-btn.bzh-rw-btn--primary:focus,
button.bzh-rw-btn.bzh-rw-btn--primary:hover,
button.bzh-rw-btn.bzh-rw-btn--primary:focus {
    background-color: #4f46e5 !important;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.02)) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.36), inset 0 -2px 0 rgba(0,0,0,0.08) !important;
    transform: translateY(-1px);
}
.bzh-rw-btn.bzh-rw-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(79, 70, 229, 0.22), inset 0 2px 0 rgba(0,0,0,0.06) !important;
}

/* Ghost — neutral slate-100 pill used for secondary actions ("به‌روزرسانی"
   after the credit has already been applied). Mid-grey text on a soft
   grey fill — never red. */
.bzh-rw-btn.bzh-rw-btn--ghost,
a.bzh-rw-btn.bzh-rw-btn--ghost,
button.bzh-rw-btn.bzh-rw-btn--ghost {
    background-color: #f3f4f6 !important;
    background-image: none !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
    -webkit-text-fill-color: #374151 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
.bzh-rw-btn.bzh-rw-btn--ghost:hover,
button.bzh-rw-btn.bzh-rw-btn--ghost:hover,
a.bzh-rw-btn.bzh-rw-btn--ghost:hover {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Danger — used for the checkout "حذف" action. Soft pink chip with
   deep-red text so it reads as destructive without shouting. */
.bzh-rw-btn.bzh-rw-btn--danger,
a.bzh-rw-btn.bzh-rw-btn--danger,
button.bzh-rw-btn.bzh-rw-btn--danger {
    background-color: #fef2f2 !important;
    background-image: none !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
    -webkit-text-fill-color: #b91c1c !important;
    box-shadow: 0 1px 2px rgba(185, 28, 28, 0.08) !important;
}
.bzh-rw-btn.bzh-rw-btn--danger:hover,
button.bzh-rw-btn.bzh-rw-btn--danger:hover,
a.bzh-rw-btn.bzh-rw-btn--danger:hover {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
    -webkit-text-fill-color: #991b1b !important;
}

/* Tables */
.bzh-rw-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	overscroll-behavior-x: contain;
}
.bzh-rw-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 560px;
}
/* Transaction history: fixed widths for data columns; note column absorbs remainder */
.bzh-rw-table--history {
	table-layout: fixed;
	width: 100%;
	min-width: 820px;
}
.bzh-rw-table--history col.bzh-rw-col--date { width: 138px; }
.bzh-rw-table--history col.bzh-rw-col--type { width: 84px; }
.bzh-rw-table--history col.bzh-rw-col--amount { width: 100px; }
.bzh-rw-table--history col.bzh-rw-col--balance { width: 108px; }
.bzh-rw-table--history col.bzh-rw-col--expiry { width: 96px; }
.bzh-rw-table--history .bzh-rw-col--date,
.bzh-rw-table--history .bzh-rw-col--type,
.bzh-rw-table--history .bzh-rw-col--amount,
.bzh-rw-table--history .bzh-rw-col--balance,
.bzh-rw-table--history .bzh-rw-col--expiry {
	white-space: nowrap;
	vertical-align: top;
}
.bzh-rw-table--history .bzh-rw-col--amount,
.bzh-rw-table--history .bzh-rw-col--balance {
	font-variant-numeric: tabular-nums;
}
.bzh-rw-table--history .bzh-rw-col--note {
	white-space: normal;
	word-break: break-word;
	overflow-wrap: anywhere;
	line-height: 1.55;
	vertical-align: top;
	color: #4b5563;
}
.bzh-rw-table th,
.bzh-rw-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #f3f4f6;
}
.bzh-rw-table thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}
.bzh-rw-amt--pos { color: #059669; font-weight: 700; }
.bzh-rw-amt--neg { color: #dc2626; font-weight: 700; }
.bzh-rw-tx-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #e0e7ff;
    color: #4338ca;
}
.bzh-rw-tx--earn       { background: #d1fae5; color: #065f46; }
.bzh-rw-tx--spend      { background: #fee2e2; color: #991b1b; }
.bzh-rw-tx--expire     { background: #fef3c7; color: #78350f; }
.bzh-rw-tx--refund     { background: #fce7f3; color: #9d174d; }
.bzh-rw-tx--admin      { background: #e0e7ff; color: #3730a3; }
.bzh-rw-tx--convert_out{ background: #ffedd5; color: #9a3412; }
.bzh-rw-tx--convert_in { background: #dcfce7; color: #166534; }

/* Gift grid */
.bzh-rw-gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.bzh-rw-gift-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bzh-rw-gift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.bzh-rw-gift-thumb {
    display: block;
    background: #f3f4f6;
    aspect-ratio: 16/10;
}
.bzh-rw-gift-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bzh-rw-gift-body { padding: 14px 16px; }
.bzh-rw-gift-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.bzh-rw-gift-title a { color: #111827; text-decoration: none; }
.bzh-rw-gift-meta { margin: 4px 0; color: #6b7280; font-size: 12px; }
.bzh-rw-gift-badge {
    display: inline-block;
    margin-inline-start: 6px;
    background: #fef3c7;
    color: #78350f;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}
.bzh-rw-gift-note { margin: 6px 0 10px; color: #374151; font-size: 12px; }

/* Product-page panel */
.bzh-rw-ppanel {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(14,165,233,0.08));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    margin: 12px 0;
    color: #111827;
    font-family: Vazirmatn, Tahoma, sans-serif;
    direction: rtl;
}
.bzh-rw-ppanel--off {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}
.bzh-rw-ppanel-icon { color: #6366f1; flex-shrink: 0; }
.bzh-rw-ppanel--off .bzh-rw-ppanel-icon { color: #dc2626; }
.bzh-rw-ppanel-headline { display: block; margin-bottom: 2px; font-size: 14px; line-height: 1.45; }
.bzh-rw-ppanel-headline__short { display: none; }
@media (max-width: 520px) {
    .bzh-rw-ppanel-headline__full { display: none; }
    .bzh-rw-ppanel-headline__short { display: block; }
    .bzh-rw-ppanel-headline {
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
.bzh-rw-ppanel-body p { margin: 0; font-size: 12px; color: #4b5563; line-height: 1.8; }
.bzh-rw-ppanel--off .bzh-rw-ppanel-body p { color: #7f1d1d; }

/* Balance card shortcode */
.bzh-rw-balance-card {
    display: inline-flex;
    flex-direction: column;
    padding: 12px 18px;
    background: #6366f1;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    min-width: 160px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    direction: rtl;
}
.bzh-rw-balance-card:hover { background: #4f46e5; color: #fff; }
.bzh-rw-balance-label { font-size: 12px; opacity: 0.85; }
.bzh-rw-balance-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.bzh-rw-balance-toman { font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* ─ Header / nav-menu variants ─
   Compact pill and chip designs meant to live inside a site header
   or a wp_nav_menu alongside normal nav links. They inherit the
   menu's line-height and sit cleanly next to other <li> items. */
.bzh-rw-bw {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    direction: rtl;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.bzh-rw-bw:hover { transform: translateY(-1px); text-decoration: none; }
.bzh-rw-bw-icon { flex: 0 0 auto; width: 16px; height: 16px; }
.bzh-rw-bw-value { font-weight: 800; font-size: 14px; letter-spacing: 0.2px; }
.bzh-rw-bw-label { font-weight: 500; opacity: 0.85; font-size: 12px; }

/* Pill: filled gradient chip, best when it stands on its own */
.bzh-rw-bw--pill {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}
.bzh-rw-bw--pill:hover {
    color: #fff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

@keyframes bzh-rw-bw-star-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 1px rgba(250, 204, 21, 0.35));
    }
    50% {
        opacity: 0.92;
        transform: scale(1.08);
        filter: drop-shadow(0 0 5px rgba(250, 204, 21, 0.65));
    }
}

.bzh-rw-bw--pill .bzh-rw-bw-icon,
.bzh-rw-bw--chip .bzh-rw-bw-icon,
.bzh-rw-bw--nav .bzh-rw-bw-icon {
    color: #facc15;
    animation: bzh-rw-bw-star-pulse 2.8s ease-in-out infinite;
}

/* Chip: ghost style, blends into a busy header */
.bzh-rw-bw--chip {
    background: rgba(99, 102, 241, 0.10);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.bzh-rw-bw--chip:hover {
    background: rgba(99, 102, 241, 0.18);
    color: #3730a3;
}

/* When injected into a wp_nav_menu <li>, remove the theme's default
   bullet/padding so the chip sits flush with other menu items. */
.bzh-rw-menu-item {
    list-style: none;
    display: flex;
    align-items: center;
}
.bzh-rw-menu-item > a,
.bzh-rw-menu-item .bzh-rw-bw { padding-top: 6px; padding-bottom: 6px; }
.bzh-rw-menu-item::before { content: none !important; }

@media (max-width: 600px) {
    .bzh-rw-bw-label { display: none; }
    .bzh-rw-bw { padding: 6px 10px; }
}

/* ── Checkout redeem block (modern) ──────────────────────────────
   Rendered inside the review-order table just above the "apply
   coupon" area. Uses a pill-shaped input + gradient CTA with a
   compact unit suffix so it feels like a modern coupon field
   rather than a cramped <tr>. */
.bzh-rw-checkout-row { background: transparent; }
.bzh-rw-checkout-row > td { padding: 0 !important; border: 0 !important; }
.bzh-rw-checkout-box {
    position: relative;
    margin: 14px 0;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 55%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    direction: rtl;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bzh-rw-checkout-box.is-applied {
    border-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 55%, #f0fdf4 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}
.bzh-rw-checkout-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.bzh-rw-checkout-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.28);
}
.bzh-rw-checkout-box.is-applied .bzh-rw-checkout-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.28);
}
.bzh-rw-checkout-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}
.bzh-rw-checkout-title {
    font-weight: 800;
    font-size: 14.5px;
    color: #1f1b4d;
    line-height: 1.2;
}
.bzh-rw-checkout-balance {
    font-size: 12px;
    color: #4b5563;
}
.bzh-rw-checkout-balance strong {
    color: #4338ca;
    font-weight: 700;
}
.bzh-rw-checkout-desc {
    margin: 0 0 12px;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.6;
}
.bzh-rw-checkout-desc strong { color: #1f1b4d; font-weight: 700; }
.bzh-rw-checkout-desc-sep { margin: 0 6px; color: #c7d2fe; }
.bzh-rw-checkout-input {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}
.bzh-rw-checkout-input-wrap {
    position: relative;
    flex: 1 1 180px;
    min-width: 0;
}
.bzh-rw-checkout-input-wrap .bzh-rw-input {
    width: 100%;
    max-width: none;
    padding: 12px 46px 12px 14px; /* pad-inline-end makes room for the unit */
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-appearance: textfield;
}
.bzh-rw-checkout-input-wrap .bzh-rw-input::-webkit-outer-spin-button,
.bzh-rw-checkout-input-wrap .bzh-rw-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.bzh-rw-checkout-input-wrap .bzh-rw-input:focus {
    outline: 0;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.bzh-rw-checkout-input-unit {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 11.5px;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 6px;
    pointer-events: none;
}
.bzh-rw-checkout-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}
.bzh-rw-checkout-buttons .bzh-rw-btn {
    padding: 12px 20px;
    min-height: 46px; /* matches the input height */
}
.bzh-rw-checkout-buttons .bzh-rw-btn--danger { padding: 12px 16px; }

/* Shared input/button primitives (also used by the convert card). */
.bzh-rw-input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}

/* ── Cart & Checkout rewards summary card ─────────────────────────
   Shown on cart (after totals) and checkout (above the payment box).
   It surfaces current balance, credits that will be earned, VIP tier
   and active gifts so customers see the full picture at purchase
   time instead of having to dig through the user panel. */

.bzh-rw-summary {
    margin: 20px 0;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff, #faf5ff 60%, #f0f9ff);
    border: 1px solid #e9d5ff;
    border-radius: 14px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    direction: rtl;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
}
.bzh-rw-summary--checkout { margin-top: 10px; }

.bzh-rw-summary-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.bzh-rw-summary-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.28);
}
.bzh-rw-summary-title {
    font-size: 15px;
    font-weight: 800;
    color: #1f1b4d;
    margin-bottom: 2px;
}
.bzh-rw-summary-sub {
    font-size: 12.5px;
    color: #6b7280;
}

.bzh-rw-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
/* Cart-context summary: keep it compact on the cart page (right column
   shares width with totals) — one tight row with small stats so it
   doesn't dominate the viewport on desktop. Checkout keeps the airier
   grid since it spans the full review-order width. */
.bzh-rw-summary--cart .bzh-rw-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 6px;
}
.bzh-rw-summary--cart .bzh-rw-summary-head {
    margin-bottom: 8px;
    gap: 8px;
    align-items: center;
}
.bzh-rw-summary--cart .bzh-rw-summary-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}
.bzh-rw-summary--cart .bzh-rw-summary-title {
    font-size: 13px;
    margin-bottom: 0;
}
.bzh-rw-summary--cart .bzh-rw-summary-stat {
    padding: 6px 7px;
    border-radius: 8px;
}
.bzh-rw-summary--cart .bzh-rw-summary-stat-label {
    font-size: 10px;
    margin-bottom: 1px;
}
.bzh-rw-summary--cart .bzh-rw-summary-stat-value {
    font-size: 14px;
    line-height: 1.15;
}
.bzh-rw-summary--cart .bzh-rw-summary-stat-note {
    font-size: 9px;
    margin-top: 1px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bzh-rw-summary--cart .bzh-rw-summary-stat--tier .bzh-rw-tier-badge {
    font-size: 11px !important;
    padding: 2px 8px !important;
}
.bzh-rw-summary--cart .bzh-rw-summary-stat--tier .bzh-rw-summary-stat-note {
    display: none;
}
.bzh-rw-summary--cart .bzh-rw-summary-gifts {
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: 8px;
}
.bzh-rw-summary--cart .bzh-rw-summary-gifts-title {
    font-size: 11px;
    margin-bottom: 4px;
}
.bzh-rw-summary--cart .bzh-rw-summary-gifts-list li {
    font-size: 11px;
    padding: 2px 0;
}
.bzh-rw-summary--cart .bzh-rw-summary-gifts-more {
    font-size: 10.5px;
    margin-top: 4px;
}
.bzh-rw-summary--cart .bzh-rw-summary-hint {
    margin-top: 6px;
    padding: 5px 8px;
    font-size: 10px;
    line-height: 1.4;
    border-radius: 7px;
}
.bzh-rw-summary-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 0; /* allow grid cells to shrink below content size */
}
.bzh-rw-summary-stat-label {
    display: block;
    font-size: 11.5px;
    color: #6b7280;
    margin-bottom: 2px;
}
.bzh-rw-summary-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}
.bzh-rw-summary-stat-note {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}
.bzh-rw-summary-stat--earn { background: linear-gradient(135deg, #ecfdf5, #f0fdf4); border-color: #a7f3d0; }
.bzh-rw-summary-stat--earn .bzh-rw-summary-stat-value { color: #059669; }
.bzh-rw-summary-stat--gb { background: linear-gradient(135deg, #f0fdfa, #ecfeff); border-color: #99f6e4; }
.bzh-rw-summary-stat-value--pending { color: #0d9488 !important; font-size: 15px !important; }
.bzh-rw-summary-stat-note--gb { color: #0f766e !important; margin-top: 4px !important; }
.bzh-rw-checkout-gb-note {
    margin: 0 0 8px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
}
.bzh-rw-summary-stat--tier { background: linear-gradient(135deg, #fff7ed, #fef3c7); border-color: #fed7aa; }

.bzh-rw-summary-gifts {
    margin-top: 8px;
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed #c4b5fd;
    border-radius: 10px;
}
.bzh-rw-summary-gifts-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #4338ca;
    margin-bottom: 6px;
}
.bzh-rw-summary-gifts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bzh-rw-summary-gifts-list li {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #374151;
    padding: 3px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.bzh-rw-summary-gifts-list li:last-child { border-bottom: 0; }
.bzh-rw-summary-gifts-meta { color: #9ca3af; font-size: 11.5px; }
.bzh-rw-summary-gifts-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #4338ca;
    text-decoration: none;
}
.bzh-rw-summary-gifts-more:hover { text-decoration: underline; }

.bzh-rw-summary-hint {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #6b7280;
    padding: 6px 10px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 8px;
}

.bzh-rw-summary-cta {
    margin-top: 8px;
}

/* Cart page: compact rewards strip (~half previous height) */
body.bzh-cart-active .bzh-rw-summary--cart {
    position: relative;
    margin: 10px 0 12px;
    padding: 10px 11px 11px;
    border-radius: 12px;
    border: 1px solid rgba(199, 210, 254, 0.75);
    background: linear-gradient(145deg, #fff 0%, #faf5ff 55%, #f8fafc 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
    overflow: hidden;
}
body.bzh-cart-active .bzh-rw-summary--cart::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-head {
    margin-bottom: 6px;
    gap: 8px;
    align-items: center;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.22);
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-icon svg {
    width: 16px;
    height: 16px;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-title {
    font-size: 13px;
    letter-spacing: 0;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-cta {
    margin-top: 6px;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-cta .bzh-rw-btn--primary {
    display: flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.22) !important;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-grid {
    gap: 6px;
    margin-bottom: 6px;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat {
    border-radius: 8px;
    padding: 6px 7px;
    box-shadow: none;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat-label {
    font-size: 10px;
    font-weight: 600;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat-value {
    font-size: 14px;
    margin-top: 0;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat-note {
    font-size: 9px;
    line-height: 1.3;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat-value--pending {
    font-size: 12px !important;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-hint {
    margin-top: 6px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 10px;
    line-height: 1.4;
    background: rgba(238, 242, 255, 0.9);
    border: 1px solid rgba(199, 210, 254, 0.5);
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-hint svg {
    width: 12px;
    height: 12px;
}
body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-gifts {
    margin-top: 4px;
    padding: 6px 8px;
}

@media (max-width: 600px) {
    .bzh-rw-summary { padding: 14px; }
    .bzh-rw-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .bzh-rw-summary--cart .bzh-rw-summary-grid { grid-template-columns: 1fr 1fr; }
    .bzh-rw-summary-stat-value { font-size: 16px; }
    /* Tier card stretches full-width on phones because its label + badge
       need the full row to avoid line-wrapping on names like "برنز". */
    .bzh-rw-summary-stat--tier { grid-column: 1 / -1; }

    body.bzh-cart-active .bzh-rw-summary--cart {
        padding: 9px 10px 10px;
        margin-inline: 0;
        border-radius: 11px;
    }
    body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px;
    }
    body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat--tier {
        grid-column: 1 / -1;
    }
    body.bzh-cart-active .bzh-rw-summary--cart .bzh-rw-summary-stat-value {
        font-size: 14px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .bzh-rw-card { padding: 16px; }
    /* On narrow screens the button drops onto its own line and
       stretches full-width so it's still easy to hit on touch. */
    .bzh-rw-convert-row { flex-direction: column; align-items: stretch; }
    .bzh-rw-convert-submit { width: 100%; justify-content: center; }
    .bzh-rw-gift-grid {
        grid-template-columns: 1fr;
    }
    .bzh-rw-table th,
    .bzh-rw-table td {
        padding: 9px 10px;
        font-size: 12.5px;
    }
}
