:root {
    --wcle-primary: #e63946;
    --wcle-secondary: #f1faee;
    --wcle-background: #1d3557;
    --wcle-text: #f1faee;
    --wcle-text-muted: #a8a8b8;
    --wcle-radius: 8px;
}

/* ======================================================================== */
/* My Account → Rewards tab                                                 */
/* ======================================================================== */

.wcle-rewards {
    --wcle-rw-bg:        #ffffff;
    --wcle-rw-surface:   #f7f7fa;
    --wcle-rw-text:      #0f172a;
    --wcle-rw-muted:     #64748b;
    --wcle-rw-border:    rgba(15, 23, 42, 0.08);
    --wcle-rw-shadow:    0 12px 32px -12px rgba(15, 23, 42, 0.18), 0 4px 12px -4px rgba(15, 23, 42, 0.06);
    --wcle-rw-radius:    14px;
    --wcle-rw-radius-sm: 10px;
    --wcle-rw-pos:       #16a34a;
    --wcle-rw-neg:       #dc2626;
    color: var(--wcle-rw-text);
}

/* Legacy balance card fallback (still used in some older slots) */
.wcle-balance-card {
    background: var(--wcle-background);
    color: var(--wcle-text);
    border-radius: var(--wcle-radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.wcle-balance-amount { font-size: 2.2rem; font-weight: 700; }
.wcle-balance-label { font-size: 0.95rem; color: var(--wcle-text-muted); margin-top: 0.25rem; }

/* ---------- Hero ---------- */
.wcle-rw-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 55%),
        radial-gradient(circle at 10% 110%, rgba(230, 57, 70, 0.45), transparent 60%),
        linear-gradient(135deg, var(--wcle-background) 0%, #0f1e33 100%);
    color: #fff;
    border-radius: var(--wcle-rw-radius);
    padding: 1.75rem 1.75rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--wcle-rw-shadow);
}
.wcle-rw-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
    pointer-events: none;
}
.wcle-rw-hero-inner { position: relative; }
.wcle-rw-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
}
.wcle-rw-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--wcle-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.25);
}
.wcle-rw-hero-amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.05;
    margin: 0.45rem 0 0.2rem;
    letter-spacing: -0.02em;
}
.wcle-rw-hero-sub {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.78);
}
.wcle-rw-hero-expiry {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

/* ---------- Stat cards ---------- */
.wcle-rw-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.wcle-rw-stat {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: var(--wcle-rw-bg);
    border: 1px solid var(--wcle-rw-border);
    border-radius: var(--wcle-rw-radius);
    box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.05);
}
.wcle-rw-stat-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.wcle-rw-stat-icon-earned   { background: linear-gradient(135deg, #22c55e, #16a34a); }
.wcle-rw-stat-icon-redeemed { background: linear-gradient(135deg, #f97316, #ea580c); }
.wcle-rw-stat-icon-referrals { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.wcle-rw-stat-body { min-width: 0; }
.wcle-rw-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wcle-rw-muted);
    font-weight: 600;
}
.wcle-rw-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wcle-rw-text);
    margin-top: 0.15rem;
}

/* ---------- Generic section card ---------- */
.wcle-rw-section {
    background: var(--wcle-rw-bg);
    border: 1px solid var(--wcle-rw-border);
    border-radius: var(--wcle-rw-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.05);
}
.wcle-rw-section-header { margin-bottom: 1rem; }
.wcle-rw-section-title {
    margin: 0 0 0.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wcle-rw-text);
}
.wcle-rw-section-sub {
    margin: 0;
    font-size: 0.88rem;
    color: var(--wcle-rw-muted);
}

/* ---------- Transaction history ---------- */
.wcle-rw-history { display: flex; flex-direction: column; }
.wcle-rw-txn {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "meta amount"
        "desc amount";
    gap: 0.2rem 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--wcle-rw-border);
}
.wcle-rw-txn:last-child { border-bottom: 0; padding-bottom: 0; }
.wcle-rw-txn:first-child { padding-top: 0; }
.wcle-rw-txn-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.wcle-rw-txn-date {
    font-size: 0.8rem;
    color: var(--wcle-rw-muted);
}
.wcle-rw-txn-desc {
    grid-area: desc;
    font-size: 0.92rem;
    color: var(--wcle-rw-text);
}
.wcle-rw-txn-amount {
    grid-area: amount;
    align-self: center;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.wcle-rw-txn-pos .wcle-rw-txn-amount { color: var(--wcle-rw-pos); }
.wcle-rw-txn-neg .wcle-rw-txn-amount { color: var(--wcle-rw-neg); }

/* Type pills */
.wcle-rw-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--wcle-rw-surface);
    color: var(--wcle-rw-muted);
}
.wcle-rw-pill-earn          { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.wcle-rw-pill-referral_earn { background: rgba(168, 85, 247, 0.14); color: #7e22ce; }
.wcle-rw-pill-redeem        { background: rgba(249, 115, 22, 0.14); color: #c2410c; }
.wcle-rw-pill-adjust        { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }
.wcle-rw-pill-expire        { background: rgba(100, 116, 139, 0.18); color: #475569; }
.wcle-rw-pill-deduct        { background: rgba(220, 38, 38, 0.14); color: #b91c1c; }

/* Empty state */
.wcle-rw-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--wcle-rw-muted);
}
.wcle-rw-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.wcle-rw-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wcle-rw-text);
    margin-bottom: 0.25rem;
}
.wcle-rw-empty-body { font-size: 0.88rem; }

/* ---------- Referral section ---------- */
.wcle-rw-referral-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.wcle-rw-referral-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wcle-rw-muted);
    margin-bottom: 0.35rem;
}
.wcle-rw-copy {
    display: flex;
    background: var(--wcle-rw-surface);
    border: 1px solid var(--wcle-rw-border);
    border-radius: var(--wcle-rw-radius-sm);
    overflow: hidden;
}
.wcle-rw-copy .wcle-copy-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.65rem 0.85rem;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.85rem;
    color: var(--wcle-rw-text);
    outline: none;
}
.wcle-rw-copy-btn {
    flex-shrink: 0;
    border: 0;
    background: var(--wcle-primary);
    color: #fff;
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.wcle-rw-copy-btn:hover { opacity: 0.88; }

/* ---------- Social share buttons ---------- */
.wcle-rw-share {
    margin: 1rem 0 0.75rem;
}
.wcle-rw-share-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--wcle-rw-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.wcle-rw-share-buttons {
    display: flex;
    gap: 0.6rem;
}
.wcle-rw-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--wcle-rw-surface);
    border: 1px solid var(--wcle-rw-border);
    color: var(--wcle-rw-text);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s, color 0.15s;
    cursor: pointer;
}
.wcle-rw-share-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 6px 14px -4px rgba(15, 23, 42, 0.18);
}
.wcle-rw-share-twitter:hover  { background: #000;     color: #fff; border-color: #000; }
.wcle-rw-share-facebook:hover { background: #1877f2;  color: #fff; border-color: #1877f2; }
.wcle-rw-share-whatsapp:hover { background: #25d366;  color: #fff; border-color: #25d366; }
.wcle-rw-share-email:hover    { background: #6366f1;  color: #fff; border-color: #6366f1; }

.wcle-rw-referral-footer {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--wcle-rw-border);
}
.wcle-rw-referral-stat { display: flex; flex-direction: column; }
.wcle-rw-referral-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--wcle-rw-text);
    line-height: 1.1;
}
.wcle-rw-referral-stat-label {
    font-size: 0.78rem;
    color: var(--wcle-rw-muted);
    margin-top: 0.15rem;
}

/* Mobile */
@media (max-width: 640px) {
    .wcle-rw-hero { padding: 1.35rem 1.25rem 1.15rem; }
    .wcle-rw-hero-amount { font-size: 2.3rem; }
    .wcle-rw-stats { grid-template-columns: 1fr; }
    .wcle-rw-section { padding: 1.15rem; }
    .wcle-rw-referral-grid { grid-template-columns: 1fr; }
    .wcle-rw-referral-footer { gap: 1.25rem; }
}

/* Legacy expiry notice (kept for backwards compat) */
.wcle-expiry-notice {
    background: var(--wcle-secondary);
    border-left: 4px solid var(--wcle-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--wcle-radius);
    margin-bottom: 1.25rem;
}

/* Legacy history table (kept as fallback) */
.wcle-history { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.wcle-history th, .wcle-history td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid #eaeaea; }
.wcle-amount.wcle-positive { color: #2a9d4e; font-weight: 600; }
.wcle-amount.wcle-negative { color: #c0392b; font-weight: 600; }

/* Referral section (legacy — used on thank-you page) */
.wcle-referral-section .wcle-referral-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.wcle-referral-section .wcle-copy-input {
    flex: 1 1 220px;
    min-width: 0;
    font-family: monospace;
}
.wcle-referral-stats { font-size: 0.9rem; color: var(--wcle-text-muted); margin-top: 0.5rem; }

/* Rewards banner (cart/checkout) */
/* ---------- Cart / checkout rewards banner ----------
 * All color / background / text rules use !important because host
 * themes (Woodmart, Flatsome, Avada, etc.) aggressively set a
 * global `color` on their cart/checkout shop_table tds to match
 * their site's dark theme. Without !important our cream-on-cream
 * banner becomes unreadable.
 */
.wcle-rewards-banner {
    background: var(--wcle-secondary) !important;
    color: var(--wcle-background) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: var(--wcle-radius) !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
    box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.05) !important;
}
.wcle-banner-default, .wcle-banner-applied {
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    color: var(--wcle-background) !important;
}
.wcle-banner-message {
    flex: 1 1 auto !important;
    color: var(--wcle-background) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}
.wcle-banner-message strong { color: var(--wcle-primary) !important; font-weight: 800 !important; }
.wcle-rewards-banner .button,
.wcle-rewards-banner .wcle-apply-points,
.wcle-rewards-banner .wcle-remove-points {
    background: var(--wcle-primary) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: var(--wcle-radius) !important;
    padding: 0.6rem 1.1rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: 0 3px 10px -3px rgba(230, 57, 70, 0.4) !important;
    cursor: pointer;
    min-height: 40px !important;
}
.wcle-rewards-banner .button:hover,
.wcle-rewards-banner .wcle-apply-points:hover,
.wcle-rewards-banner .wcle-remove-points:hover {
    background: #d32e3b !important;
    color: #fff !important;
    opacity: 1 !important;
}
.wcle-toggle-partial {
    flex-basis: 100% !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    color: var(--wcle-primary) !important;
    background: transparent !important;
    text-align: left;
    padding: 0.15rem 0 !important;
    cursor: pointer;
}
.wcle-toggle-partial:hover {
    color: #d32e3b !important;
    opacity: 0.85;
}
.wcle-partial-input {
    flex-basis: 100% !important;
    display: flex !important;
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
    align-items: center;
}
/* Double-class + type attribute for specificity boost against
   theme input resets that typically use .woocommerce form input
   selectors at 0,2,2 or higher. */
.wcle-partial-input input.wcle-partial-amount,
input.wcle-partial-amount.wcle-partial-amount,
.wcle-partial-amount[type="number"] {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0.5rem 0.7rem !important;
    background: #fff !important;
    background-color: #fff !important;
    color: var(--wcle-background) !important;
    border: 1px solid rgba(15, 23, 42, 0.2) !important;
    border-radius: var(--wcle-radius) !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
}
.wcle-partial-input input.wcle-partial-amount:focus,
input.wcle-partial-amount.wcle-partial-amount:focus,
.wcle-partial-amount[type="number"]:focus {
    border-color: var(--wcle-primary) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18) !important;
}

/* ---------- Checkout: manual referral code entry ----------
 * Same !important pattern as the cart banner — themes set global
 * text colors that make a cream-on-cream panel unreadable.
 */
.wcle-checkout-referral {
    margin: 0.75rem 0 1rem !important;
    padding: 0.85rem 1rem !important;
    background: var(--wcle-secondary) !important;
    color: var(--wcle-background) !important;
    border: 1px dashed rgba(0, 0, 0, 0.15) !important;
    border-radius: var(--wcle-radius) !important;
}
.wcle-checkout-referral-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    color: var(--wcle-primary) !important;
    background: transparent !important;
}
.wcle-checkout-referral-toggle::before {
    content: '★';
    color: var(--wcle-primary) !important;
}
.wcle-checkout-referral-toggle:hover { text-decoration: underline !important; color: var(--wcle-primary) !important; }
.wcle-checkout-referral-form { margin-top: 0.6rem !important; }
.wcle-checkout-referral-help {
    margin: 0 0 0.5rem !important;
    font-size: 0.85rem !important;
    color: rgba(15, 23, 42, 0.7) !important;
    line-height: 1.4 !important;
}
.wcle-checkout-referral-row {
    display: flex;
    gap: 0.5rem;
}
input.wcle-checkout-referral-input,
.wcle-checkout-referral-input.wcle-checkout-referral-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0.55rem 0.7rem !important;
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
    border-radius: var(--wcle-radius) !important;
    font-family: monospace !important;
    text-transform: uppercase !important;
    background: #fff !important;
    background-color: #fff !important;
    color: var(--wcle-background) !important;
    box-shadow: none !important;
}
input.wcle-checkout-referral-input:focus,
.wcle-checkout-referral-input.wcle-checkout-referral-input:focus {
    border-color: var(--wcle-primary) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18) !important;
}
.wcle-checkout-referral-apply {
    background: var(--wcle-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 0.55rem 1rem !important;
    border-radius: var(--wcle-radius) !important;
    cursor: pointer;
    font-weight: 600;
}
.wcle-checkout-referral-apply:hover { opacity: 0.9; }
.wcle-checkout-referral-message {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 1.2em;
}
.wcle-checkout-referral-message.is-success { color: #16a34a; }
.wcle-checkout-referral-message.is-error { color: #c0392b; }

/* ---------- Earn preview row (cart + checkout) ----------
 * Lives inside the cart totals table. Theme cart tables often have
 * dark backgrounds and light text, so we force our own cream
 * background + dark text with !important. The row must be
 * readable regardless of the host theme's table styling.
 */
.wcle-earn-preview th,
.wcle-earn-preview td {
    padding: 0.85rem 1rem !important;
    background: var(--wcle-secondary) !important;
    color: var(--wcle-background) !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    font-weight: normal !important;
    text-align: left !important;
}
.wcle-earn-preview-inner {
    display: flex !important;
    gap: 0.7rem !important;
    align-items: flex-start !important;
    color: var(--wcle-background) !important;
}
.wcle-earn-preview-icon {
    color: var(--wcle-primary) !important;
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    flex-shrink: 0;
}
.wcle-earn-preview-headline {
    font-weight: 700 !important;
    color: var(--wcle-background) !important;
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
}
.wcle-earn-preview-headline strong { color: var(--wcle-primary) !important; font-weight: 800 !important; }
.wcle-earn-preview-disclaimer {
    font-size: 0.78rem !important;
    color: rgba(15, 23, 42, 0.6) !important;
    margin-top: 0.2rem !important;
    line-height: 1.35 !important;
}

/* ---------- Guest incentive (shown to logged-out shoppers) ---------- */
.wcle-guest-incentive {
    background: var(--wcle-secondary) !important;
    color: var(--wcle-background) !important;
    padding: 0.85rem 1.1rem !important;
    border-radius: var(--wcle-radius) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    margin-bottom: 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
}
.wcle-guest-incentive strong { color: var(--wcle-primary) !important; font-weight: 800 !important; }
.wcle-guest-incentive a { color: var(--wcle-primary) !important; text-decoration: underline !important; }

/* ---------- Product badge ("Earn N points" on product pages) ----------
 * Same theme-override problem as the cart banner — themes force
 * text color on product summaries. !important keeps this readable
 * on any background.
 */
.wcle-points-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    background: var(--wcle-secondary) !important;
    color: var(--wcle-background) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    padding: 0.3rem 0.65rem !important;
    border-radius: var(--wcle-radius) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0.35rem 0 !important;
    text-shadow: none !important;
}
.wcle-points-badge .wcle-badge-text { color: var(--wcle-background) !important; font-weight: 700 !important; }
.wcle-badge-icon { color: var(--wcle-primary) !important; }

/* Referral prompt on thank-you page */
.wcle-referral-prompt {
    background: var(--wcle-secondary);
    padding: 1.25rem;
    border-radius: var(--wcle-radius);
    margin-top: 1.5rem;
}
.wcle-referral-prompt .wcle-referral-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.wcle-referral-prompt .wcle-copy-input { flex: 1 1 220px; min-width: 0; font-family: monospace; }
.wcle-share-email { margin-top: 0.5rem; display: inline-block; }

/* Header balance */
.wcle-header-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    background: var(--wcle-primary);
    color: #fff !important;
    border-radius: var(--wcle-radius);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}
.wcle-header-balance:hover { opacity: 0.9; }

/* Mobile */
@media (max-width: 600px) {
    .wcle-balance-amount { font-size: 1.8rem; }
    .wcle-history th, .wcle-history td { padding: 0.4rem; font-size: 0.85rem; }
}

/* ======================================================================== */
/* Floating rewards widget                                                  */
/* ======================================================================== */

/*
 * Widget-scoped tokens. These live on the root container so every rule
 * below can tune appearance without leaking into the theme. They inherit
 * from the global --wcle-* brand tokens.
 */
.wcle-widget-panel,
.wcle-widget-launcher {
    --wcle-w-bg:        #ffffff;
    --wcle-w-surface:   #f7f7fa;
    --wcle-w-text:      #0f172a;
    --wcle-w-muted:     #64748b;
    --wcle-w-border:    rgba(15, 23, 42, 0.08);
    --wcle-w-shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.35), 0 8px 24px -6px rgba(15, 23, 42, 0.12);
    --wcle-w-radius:    14px;
    --wcle-w-radius-sm: 10px;
}

/* ---------- Theme isolation reset ----------
 * Host themes (Woodmart, Astra, OceanWP, etc.) commonly ship broad
 * selectors that target every `button`, `aside`, `a`, `h2`, etc. on
 * the page. Our widget is an isolated UI island and must not inherit
 * those styles. This reset block normalizes box-sizing, font, and
 * text-decoration on every descendant of the widget root, and every
 * subsequent rule in this file uses !important on the properties
 * themes most often touch (background, color, border, padding,
 * font-size, text-transform). That makes the widget render
 * consistently regardless of the host theme.
 */
.wcle-widget-panel,
.wcle-widget-panel *,
.wcle-widget-panel *::before,
.wcle-widget-panel *::after,
.wcle-widget-launcher,
.wcle-widget-launcher *,
.wcle-widget-launcher *::before,
.wcle-widget-launcher *::after {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    line-height: 1.35 !important;
    letter-spacing: normal;
    text-shadow: none !important;
    text-decoration: none !important;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: none;
}
.wcle-widget-panel a,
.wcle-widget-launcher a {
    text-decoration: none !important;
    color: inherit;
}
.wcle-widget-panel button,
.wcle-widget-launcher,
.wcle-widget-panel button:hover,
.wcle-widget-panel button:focus,
.wcle-widget-panel button:active {
    /* Reset the browser + theme <button> defaults so our styled
       buttons start from a clean slate. */
    font: inherit;
    outline: none;
    text-transform: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.wcle-widget-panel img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* ---------- Launcher tab ----------
 * Position properties use !important because host themes (Woodmart,
 * Storefront child themes, etc.) commonly apply broader button/type
 * selectors that outrank a plain class selector. These four rules are
 * what keep the launcher floating at the viewport edge, so they need
 * to survive any theme's button resets.
 */
.wcle-widget-launcher {
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    bottom: 96px !important;
    z-index: 9998 !important;
    isolation: isolate;
    overflow: visible;
    /* Brand-adaptive gradient: derived from --wcle-primary via color-mix so
       the store's primary flows through top→bottom without baking in any
       specific hue. Fallback solid first for pre-2023 browsers. */
    background: var(--wcle-primary) !important;
    background: linear-gradient(
        200deg,
        color-mix(in srgb, var(--wcle-primary) 88%, #ffffff 12%) 0%,
        color-mix(in srgb, var(--wcle-primary) 96%, #ffffff 4%) 28%,
        var(--wcle-primary) 60%,
        color-mix(in srgb, var(--wcle-primary) 78%, #000000 22%) 100%
    ) !important;
    color: #fff !important;
    border: none !important;
    padding: 1.25rem 0.55rem 1.25rem 0.6rem !important;
    border-radius: 0 20px 20px 0 !important;
    cursor: pointer;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.14em !important;
    /* Layered shadow: brand-tinted ambient glow, crisp midground, inner
       top/side highlights that read as specular light on a glossy bevel. */
    box-shadow:
        14px 20px 48px -14px color-mix(in srgb, var(--wcle-primary) 60%, transparent),
        6px 10px 22px -6px rgba(15, 23, 42, 0.22),
        2px 2px 0 0 rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset -1px 0 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.10) !important;
    transition:
        transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.28s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.65rem !important;
    line-height: 1 !important;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
    will-change: transform;
    /* Entrance: gentle slide-in + fade from the edge on first paint. */
    animation: wcle-launcher-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* The gloss highlight across the top-inner curve — a thin crescent of
   light that sells the "physical button" feel. */
.wcle-widget-launcher::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 38%;
    border-radius: 0 19px 0 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.05) 55%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.wcle-widget-launcher:hover {
    transform: translateX(6px) !important;
    box-shadow:
        18px 24px 56px -14px color-mix(in srgb, var(--wcle-primary) 70%, transparent),
        8px 12px 26px -6px rgba(15, 23, 42, 0.26),
        2px 2px 0 0 rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset -1px 0 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12) !important;
}
.wcle-widget-launcher:active {
    transform: translateX(3px) scale(0.98) !important;
    transition: transform 0.1s ease !important;
}
.wcle-widget-launcher:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--wcle-primary) 45%, #ffffff 55%) !important;
    outline-offset: 3px !important;
}

/* Inner stack — a normal flex column so children stack top-to-bottom
   visually. Only the text span rotates to read vertically (bottom-up)
   in the classic Smile / LoyaltyLion style. */
.wcle-widget-launcher-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.65rem !important;
    position: relative;
    z-index: 2;
}

.wcle-widget-launcher-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #fff !important;
    filter:
        drop-shadow(0 1px 0 rgba(0, 0, 0, 0.22))
        drop-shadow(0 0 6px color-mix(in srgb, #ffffff 35%, transparent));
    flex-shrink: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center 70%;
}
.wcle-widget-launcher-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.wcle-widget-launcher:hover .wcle-widget-launcher-icon {
    transform: scale(1.14) rotate(-6deg);
}

.wcle-widget-launcher-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-transform: uppercase;
    max-height: 9rem;
    color: #fff !important;
    font-weight: 800;
    letter-spacing: 0.24em;
    font-size: 0.74rem;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.22),
        0 0 10px color-mix(in srgb, var(--wcle-primary) 50%, transparent) !important;
}

.wcle-widget-launcher-chevron {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease !important;
    position: relative;
    z-index: 2;
}
.wcle-widget-launcher-chevron svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18));
}
.wcle-widget-launcher:hover .wcle-widget-launcher-chevron {
    color: #fff !important;
    transform: translateX(3px);
}
.wcle-widget-launcher.is-open .wcle-widget-launcher-chevron {
    transform: rotate(180deg);
}

/* Shine sweep — a diagonal white gradient that glides across the button
   on hover. Contained in its own clipped layer so the launcher's outer
   shadows stay unclipped. The transform-transition pattern restarts
   cleanly on every hover cycle. */
.wcle-widget-launcher-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.wcle-widget-launcher-shine::before {
    content: "";
    position: absolute;
    top: -30%;
    left: 0;
    width: 55%;
    height: 160%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.0) 30%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.0) 70%,
        transparent 100%
    );
    transform: translateX(-220%);
    transition: transform 0s;
    mix-blend-mode: screen;
}
.wcle-widget-launcher:hover .wcle-widget-launcher-shine::before {
    transform: translateX(520%);
    transition: transform 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Attention pulse — a soft ring that breathes out of the launcher on
   first paint, three times, then stops. Decorative; respects
   reduced-motion. */
.wcle-widget-launcher-pulse {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--wcle-primary) 55%, transparent);
    animation: wcle-launcher-pulse 2.6s ease-out 1.4s 3;
    z-index: 0;
}

@keyframes wcle-launcher-enter {
    0%   { opacity: 0; transform: translateX(-24px); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes wcle-launcher-pulse {
    0%   { box-shadow: 0 0 0 0    color-mix(in srgb, var(--wcle-primary) 55%, transparent); }
    70%  { box-shadow: 0 0 0 16px color-mix(in srgb, var(--wcle-primary)  0%, transparent); }
    100% { box-shadow: 0 0 0 0    color-mix(in srgb, var(--wcle-primary)  0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .wcle-widget-launcher,
    .wcle-widget-launcher-pulse,
    .wcle-widget-launcher-icon,
    .wcle-widget-launcher-shine::before {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Panel ---------- */
.wcle-widget-panel {
    position: fixed !important;
    left: 18px !important;
    right: auto !important;
    bottom: 18px !important;
    top: auto !important;
    z-index: 9999 !important;
    width: 360px;
    max-width: calc(100vw - 1rem);
    max-height: 90vh;
    background: var(--wcle-w-bg);
    color: var(--wcle-w-text);
    border-radius: var(--wcle-w-radius);
    box-shadow: var(--wcle-w-shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
}
.wcle-widget-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ---------- Panel close button ---------- */
.wcle-widget-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(15, 23, 42, 0.06) !important;
    border: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    cursor: pointer;
    color: var(--wcle-w-muted) !important;
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    z-index: 3;
    touch-action: manipulation;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    box-shadow: none !important;
    text-transform: none !important;
}
.wcle-widget-close:hover {
    background: rgba(15, 23, 42, 0.12) !important;
    color: var(--wcle-w-text) !important;
    transform: rotate(90deg) !important;
}

/* ---------- Views ---------- */
.wcle-widget-view {
    display: none;
    padding: 0.9rem 1.1rem 1.05rem;
    overflow-y: auto;
    /* Use flex: 1 1 auto on the wrapper so the scrollable region fills the panel,
       but keep the inside as block layout so children don't get flex-shrunk. */
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.15) transparent;
}
.wcle-widget-view::-webkit-scrollbar { width: 6px; }
.wcle-widget-view::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 3px;
}
.wcle-widget-view-home,
.wcle-widget-view-redeem,
.wcle-widget-view-history { display: none; }
.wcle-widget-panel[data-view="home"] .wcle-widget-view-home { display: block; }
.wcle-widget-panel[data-view="how-it-works"] .wcle-widget-view-how { display: block; }
.wcle-widget-panel[data-view="redeem"] .wcle-widget-view-redeem { display: block; }
.wcle-widget-panel[data-view="history"] .wcle-widget-view-history { display: block; }

/* ---------- Header ---------- */
.wcle-widget-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
    padding-right: 2rem;
}
.wcle-widget-header-icon {
    color: var(--wcle-primary);
    font-size: 1.1rem;
    filter: drop-shadow(0 0 8px rgba(230, 57, 70, 0.35));
}
.wcle-widget-header-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--wcle-w-text) !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    text-align: left !important;
    line-height: 1.3 !important;
    background: none !important;
    border: 0 !important;
}
.wcle-widget-back {
    background: rgba(15, 23, 42, 0.06) !important;
    border: 0 !important;
    font-size: 1.3rem !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    cursor: pointer;
    color: var(--wcle-w-text) !important;
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    min-width: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 0.25rem 0 -0.25rem !important;
    touch-action: manipulation;
    transition: background 0.15s, transform 0.15s;
    box-shadow: none !important;
    text-transform: none !important;
}
.wcle-widget-back:hover {
    background: rgba(15, 23, 42, 0.12) !important;
    transform: translateX(-2px) !important;
    color: var(--wcle-w-text) !important;
}

/* ---------- Avatar block (both states) ---------- */
.wcle-widget-avatar-block {
    display: flex;
    justify-content: center;
    margin: 0 0 0.65rem;
}
.wcle-widget-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--wcle-secondary) 0%, #eef2ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 4px rgba(230, 57, 70, 0.15),
        0 8px 20px -6px rgba(15, 23, 42, 0.18);
    position: relative;
}
.wcle-widget-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Welcome (logged-out) ---------- */
.wcle-widget-welcome {
    text-align: center;
    margin-bottom: 0.7rem;
}
.wcle-widget-welcome-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--wcle-w-text);
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.wcle-widget-welcome-sub {
    font-size: 0.86rem;
    color: var(--wcle-w-muted);
    margin-top: 0.2rem;
    line-height: 1.3;
}
.wcle-widget-pitch {
    font-size: 0.78rem;
    color: var(--wcle-w-muted);
    margin: 0 0 0.75rem;
    line-height: 1.45;
    text-align: center;
    padding: 0 0.15rem;
}

/* ---------- Balance card (logged-in) ----------
 * A rich, layered card with:
 *  - Multi-stop gradient background (brand navy → lighter navy → accent tint)
 *  - Two radial "glow" corners (red brand + white highlight)
 *  - Diagonal shine overlay on hover
 *  - Inner border glow for depth
 *  - Decorative ✦ sparkles anchored to opposite corners
 *  - 3-line content hierarchy: small label, big number, dollar worth
 */
.wcle-widget-balance-card {
    position: relative;
    background:
        radial-gradient(circle at 85% 15%, rgba(230, 57, 70, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 15% 110%, rgba(124, 58, 237, 0.25) 0%, transparent 55%),
        linear-gradient(135deg, #1e3a8a 0%, var(--wcle-background) 50%, #0f172a 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 1.1rem 1.25rem 1rem !important;
    margin: 0 0 0.8rem !important;
    text-align: left !important;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 10px 28px -10px rgba(15, 23, 42, 0.6),
        0 4px 10px -4px rgba(29, 53, 87, 0.45) !important;
    isolation: isolate;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wcle-widget-balance-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 14px 34px -10px rgba(15, 23, 42, 0.65),
        0 6px 14px -4px rgba(230, 57, 70, 0.25) !important;
}
/* Diagonal shine sweep that moves on hover */
.wcle-widget-balance-card::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 0;
}
.wcle-widget-balance-card:hover::before {
    transform: translateX(100%);
}
/* Subtle large corner-blur highlight for depth */
.wcle-widget-balance-card::after {
    content: '' !important;
    position: absolute !important;
    top: -30px !important;
    right: -25px !important;
    width: 140px !important;
    height: 140px !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 65%);
    border-radius: 50% !important;
    pointer-events: none;
    z-index: 0;
}

/* Decorative sparkles — ✦ unicode, one top-left, one top-right faded */
.wcle-widget-balance-sparkle {
    position: absolute !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    top: 10px !important;
    right: 14px !important;
    z-index: 2;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
    animation: wcle-sparkle 3s ease-in-out infinite;
}
.wcle-widget-balance-sparkle-2 {
    top: auto !important;
    bottom: 14px !important;
    left: 18px !important;
    right: auto !important;
    font-size: 0.6rem !important;
    color: rgba(230, 57, 70, 0.7) !important;
    animation-delay: 1.5s;
}
@keyframes wcle-sparkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

.wcle-widget-balance-label {
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.55) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    margin: 0 0 0.35rem !important;
    padding: 0 !important;
    line-height: 1 !important;
    position: relative;
    z-index: 1;
}
.wcle-widget-balance-amount {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    letter-spacing: -0.025em !important;
    line-height: 1 !important;
    position: relative;
    z-index: 1;
    margin: 0 0 0.45rem !important;
    padding: 0 !important;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.4) !important;
    /* Subtle gradient on the number itself */
    background: linear-gradient(180deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.wcle-widget-balance-worth {
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    padding: 0.32rem 0.55rem !important;
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 999px !important;
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 1;
}
.wcle-widget-balance-worth .amount,
.wcle-widget-balance-worth .woocommerce-Price-amount,
.wcle-widget-balance-worth bdi {
    color: #fff !important;
    font-weight: 700 !important;
}
.wcle-widget-balance-worth-empty {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    font-style: italic;
}

/* ---------- Active campaign banner ----------
 * Shown above the balance card when WCLE_Campaigns::get_active()
 * returns a campaign. Styled as a warm, glowing alert pill with
 * animated flame icon. Eye-catching but not obnoxious.
 */
.wcle-widget-campaign-banner {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    padding: 0.7rem 0.9rem !important;
    margin: 0 0 0.7rem !important;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 12px !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 8px 20px -8px rgba(249, 115, 22, 0.6),
        0 2px 6px -2px rgba(220, 38, 38, 0.4) !important;
    position: relative;
    overflow: hidden;
}
.wcle-widget-campaign-banner::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    animation: wcle-campaign-shine 3.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes wcle-campaign-shine {
    0%, 100% { transform: translateX(-120%); }
    50%      { transform: translateX(120%); }
}
.wcle-widget-campaign-icon {
    font-size: 1.4rem !important;
    line-height: 1 !important;
    filter: drop-shadow(0 0 4px rgba(255, 200, 100, 0.8));
    flex-shrink: 0;
    animation: wcle-flame 1.8s ease-in-out infinite;
    position: relative;
    z-index: 1;
}
@keyframes wcle-flame {
    0%, 100% { transform: scale(1) rotate(-3deg); }
    50%      { transform: scale(1.08) rotate(3deg); }
}
.wcle-widget-campaign-text {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.wcle-widget-campaign-name {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: -0.005em;
    line-height: 1.15 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.wcle-widget-campaign-detail {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin-top: 0.15rem !important;
    line-height: 1.2 !important;
}

/* ---------- Progress bar (inside the balance card) ----------
 * Styled for the DARK balance card background (not a standalone
 * element). Uses white-on-dark colors so contrast is high even at
 * 0% progress. A position-marker dot sits at the current progress
 * point so the bar is visually present even when the fill is tiny.
 */
.wcle-widget-progress {
    position: relative;
    z-index: 1;
    margin: 0.85rem 0 0 !important;
    padding: 0 !important;
}
.wcle-widget-progress-track {
    position: relative;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border-radius: 999px !important;
    overflow: visible; /* the dot pokes slightly above the track */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset !important;
}
.wcle-widget-progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #fbbf24 0%, var(--wcle-primary) 50%, #f97316 100%) !important;
    border-radius: 999px !important;
    transition: width 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow:
        0 0 10px rgba(251, 191, 36, 0.6),
        0 0 18px -2px rgba(230, 57, 70, 0.45);
    position: relative;
    animation: wcle-progress-shimmer 2.4s ease-in-out infinite;
}
@keyframes wcle-progress-shimmer {
    0%, 100% { opacity: 0.9; }
    50%      { opacity: 1;   }
}
.wcle-widget-progress-dot {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 0 2px var(--wcle-primary),
        0 2px 6px rgba(0, 0, 0, 0.35),
        0 0 10px rgba(251, 191, 36, 0.7);
    z-index: 2;
}
.is-reached .wcle-widget-progress-fill {
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 50%, #16a34a 100%) !important;
    box-shadow:
        0 0 12px rgba(74, 222, 128, 0.7),
        0 0 20px -2px rgba(34, 197, 94, 0.55);
    animation: none;
}
.wcle-widget-progress-text {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-align: center !important;
    margin-top: 0.45rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
}
.wcle-widget-progress-text strong {
    color: #fff !important;
    font-weight: 800 !important;
}
.wcle-widget-progress-emoji {
    margin-right: 0.2rem;
    display: inline-block;
    animation: wcle-bounce 1.4s ease-in-out infinite;
}
@keyframes wcle-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-2px); }
}
.is-reached .wcle-widget-progress-text {
    color: #bbf7d0 !important;
}

/* ---------- CTA row ---------- */
.wcle-widget-cta-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}
.wcle-widget-cta-row .wcle-widget-btn { flex: 1; }

/* ---------- Buttons ----------
 * Every property that a host theme's `button`, `.button`, `a.button`,
 * or WooCommerce `.button.alt` selector typically sets is declared
 * !important here so our widget buttons render identically on any
 * theme. Hover/active states follow the same rule.
 */
.wcle-widget-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.7rem 1rem !important;
    margin: 0 !important;
    border: 1.5px solid transparent !important;
    border-radius: var(--wcle-w-radius-sm) !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s, border-color 0.15s, opacity 0.15s !important;
    touch-action: manipulation;
    min-height: 44px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    width: auto;
    -webkit-appearance: none;
    appearance: none;
}
.wcle-widget-btn:hover {
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}
.wcle-widget-btn:active {
    transform: translateY(0) !important;
}
.wcle-widget-btn:focus-visible {
    outline: 2px solid var(--wcle-primary) !important;
    outline-offset: 2px !important;
}
.wcle-widget-btn-primary,
.wcle-widget-btn-primary:visited {
    background: linear-gradient(180deg, var(--wcle-primary) 0%, #cf2c39 100%) !important;
    background-color: var(--wcle-primary) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px -4px rgba(230, 57, 70, 0.45) !important;
}
.wcle-widget-btn-primary:hover,
.wcle-widget-btn-primary:focus {
    background: linear-gradient(180deg, #ef4753 0%, #d32e3b 100%) !important;
    background-color: #ef4753 !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 18px -4px rgba(230, 57, 70, 0.55) !important;
}
.wcle-widget-btn-secondary,
.wcle-widget-btn-secondary:visited {
    background: #fff !important;
    background-color: #fff !important;
    color: var(--wcle-w-text) !important;
    border-color: rgba(15, 23, 42, 0.18) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
.wcle-widget-btn-secondary:hover,
.wcle-widget-btn-secondary:focus {
    background: #fafafc !important;
    background-color: #fafafc !important;
    color: var(--wcle-w-text) !important;
    border-color: rgba(15, 23, 42, 0.35) !important;
}
.wcle-widget-btn-dark,
.wcle-widget-btn-dark:visited {
    background: var(--wcle-w-text) !important;
    background-color: var(--wcle-w-text) !important;
    color: #fff !important;
    border-color: transparent !important;
    width: 100% !important;
    box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.35) !important;
}
.wcle-widget-btn-dark:hover,
.wcle-widget-btn-dark:focus {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.45) !important;
}
/* The "How it works" link now uses the menu-item visual style
 * (see .wcle-widget-menu-item below). Kept as a class hook in case
 * JS targets it, but visual rules come from the menu-item selectors. */
.wcle-widget-how-link {
    width: 100% !important;
}

/* ---------- Feature icons row ---------- */
.wcle-widget-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    text-align: center;
}
.wcle-widget-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.35rem 0.5rem;
    background: var(--wcle-w-surface);
    border-radius: var(--wcle-w-radius-sm);
    transition: transform 0.15s ease, background 0.15s;
}
.wcle-widget-feature:hover {
    transform: translateY(-2px);
    background: #eef2f7;
}
.wcle-widget-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}
/* Accent-colored icon circles — one per position so no template change needed. */
.wcle-widget-feature:nth-child(1) .wcle-widget-feature-icon {
    background: #fef3c7; color: #d97706;
}
.wcle-widget-feature:nth-child(2) .wcle-widget-feature-icon {
    background: #dcfce7; color: #16a34a;
}
.wcle-widget-feature:nth-child(3) .wcle-widget-feature-icon {
    background: #ede9fe; color: #7c3aed;
}
.wcle-widget-feature-label {
    font-size: 0.68rem;
    color: var(--wcle-w-muted);
    line-height: 1.2;
    font-weight: 600;
}
/* Dynamic stat tiles: big number row between icon and label.
 * Used when `.wcle-widget-features-dynamic` is on the parent. */
.wcle-widget-feature-stat {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: var(--wcle-w-text) !important;
    line-height: 1.1 !important;
    margin: 0.25rem 0 0.1rem !important;
    padding: 0 !important;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}
.wcle-widget-features-dynamic .wcle-widget-feature {
    padding: 0.7rem 0.35rem 0.6rem !important;
}

/* ---------- Home view menu (logged-in) ----------
 * Stack of full-width rows that act as navigation into sub-views
 * (Redeem, History, How it works) and external links (dashboard).
 * Works as both <button> and <a> — every visual property is
 * !important to defeat host-theme button/anchor resets.
 */
.wcle-widget-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem !important;
    margin: 0 0 0.8rem !important;
    padding: 0 !important;
    list-style: none !important;
}
.wcle-widget-panel .wcle-widget-menu-item,
.wcle-widget-panel a.wcle-widget-menu-item,
.wcle-widget-panel button.wcle-widget-menu-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 0.7rem !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 0.7rem 0.9rem !important;
    margin: 0 !important;
    background: var(--wcle-w-surface) !important;
    background-color: var(--wcle-w-surface) !important;
    color: var(--wcle-w-text) !important;
    border: 1px solid var(--wcle-w-border) !important;
    border-radius: var(--wcle-w-radius-sm) !important;
    font: inherit !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.005em !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
}
.wcle-widget-panel .wcle-widget-menu-item:hover,
.wcle-widget-panel .wcle-widget-menu-item:focus,
.wcle-widget-panel a.wcle-widget-menu-item:hover,
.wcle-widget-panel button.wcle-widget-menu-item:hover {
    background: #eef2f7 !important;
    background-color: #eef2f7 !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
    color: var(--wcle-w-text) !important;
    transform: translateX(2px);
    text-decoration: none !important;
}
.wcle-widget-panel .wcle-widget-menu-item:hover .wcle-widget-menu-chev,
.wcle-widget-panel .wcle-widget-menu-item:focus .wcle-widget-menu-chev {
    transform: translateX(3px);
    color: var(--wcle-w-text) !important;
}
.wcle-widget-panel .wcle-widget-menu-item:focus-visible {
    outline: 2px solid var(--wcle-primary) !important;
    outline-offset: 2px !important;
}
.wcle-widget-panel .wcle-widget-menu-item[disabled],
.wcle-widget-panel .wcle-widget-menu-item:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}
.wcle-widget-panel .wcle-widget-menu-item[disabled]:hover,
.wcle-widget-panel .wcle-widget-menu-item:disabled:hover {
    background: var(--wcle-w-surface) !important;
    background-color: var(--wcle-w-surface) !important;
    border-color: var(--wcle-w-border) !important;
    transform: none !important;
}
.wcle-widget-panel .wcle-widget-menu-item[disabled]:hover .wcle-widget-menu-chev,
.wcle-widget-panel .wcle-widget-menu-item:disabled:hover .wcle-widget-menu-chev {
    transform: none;
}
.wcle-widget-menu-icon {
    flex: 0 0 auto !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    background: #fff !important;
    color: var(--wcle-w-text) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}
/* Per-row icon tint so each menu entry has a distinct color accent. */
.wcle-widget-menu-item:nth-child(1) .wcle-widget-menu-icon { background: #fee2e2 !important; color: #dc2626 !important; }
.wcle-widget-menu-item:nth-child(2) .wcle-widget-menu-icon { background: #dbeafe !important; color: #2563eb !important; }
.wcle-widget-menu-item:nth-child(3) .wcle-widget-menu-icon { background: #ede9fe !important; color: #7c3aed !important; }
.wcle-widget-menu-item:nth-child(4) .wcle-widget-menu-icon { background: #dcfce7 !important; color: #16a34a !important; }
.wcle-widget-menu-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    color: var(--wcle-w-text) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.005em !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}
.wcle-widget-menu-chev {
    flex: 0 0 auto !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
    color: var(--wcle-w-muted) !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    transition: transform 0.15s ease, color 0.15s ease;
}

/* ---------- How-it-works: rate card ---------- */
.wcle-widget-rate-card {
    position: relative;
    background: linear-gradient(135deg, var(--wcle-background) 0%, #2d4a7e 100%);
    color: #fff;
    border-radius: var(--wcle-w-radius-sm);
    padding: 0.8rem 0.9rem 0.85rem;
    margin-bottom: 0.65rem;
    overflow: hidden;
    box-shadow: 0 6px 20px -8px rgba(29, 53, 87, 0.5);
}
.wcle-widget-rate-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.3) 0%, transparent 70%);
    pointer-events: none;
}
.wcle-widget-rate-title {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}
.wcle-widget-rate-body {
    font-size: 0.74rem;
    opacity: 0.85;
    margin: 0 0 0.55rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}
.wcle-widget-rate-badge {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    color: #fff;
    display: inline-block;
    padding: 0.26rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
}

/* ---------- How-it-works: earn list ---------- */
.wcle-widget-earn-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.wcle-widget-earn-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    background: var(--wcle-w-surface);
    border-radius: var(--wcle-w-radius-sm);
    border: 1px solid var(--wcle-w-border);
    transition: background 0.15s, border-color 0.15s;
}
.wcle-widget-earn-row:hover {
    background: #eef2f7;
    border-color: rgba(15, 23, 42, 0.12);
}
.wcle-widget-earn-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex: 0 0 auto;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
/* Per-row icon tint (matches the feature icons row) */
.wcle-widget-earn-row:nth-child(1) .wcle-widget-earn-icon { background: #dbeafe; }
.wcle-widget-earn-row:nth-child(2) .wcle-widget-earn-icon { background: #fef3c7; }
.wcle-widget-earn-row:nth-child(3) .wcle-widget-earn-icon { background: #dcfce7; }
.wcle-widget-earn-row:nth-child(4) .wcle-widget-earn-icon { background: #ede9fe; }
.wcle-widget-earn-row:nth-child(5) .wcle-widget-earn-icon { background: #fce7f3; }
.wcle-widget-earn-row:nth-child(6) .wcle-widget-earn-icon { background: #fed7aa; }
.wcle-widget-earn-label {
    flex: 1;
    font-weight: 700;
    color: var(--wcle-w-text);
    font-size: 0.8rem;
    letter-spacing: -0.005em;
    line-height: 1.25;
}
.wcle-widget-earn-value {
    font-size: 0.72rem;
    color: var(--wcle-w-muted);
    font-weight: 600;
    text-align: right;
    line-height: 1.25;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}
.wcle-widget-earn-cta {
    display: inline-block !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: var(--wcle-primary) !important;
    text-decoration: none !important;
    padding: 0.1rem 0 !important;
    margin: 0 !important;
    letter-spacing: 0.01em;
    transition: opacity 0.15s ease;
}
.wcle-widget-earn-cta:hover {
    opacity: 0.75;
    text-decoration: none !important;
}

/* ---------- How-it-works: referrals card ---------- */
.wcle-widget-referral-card {
    position: relative;
    background: linear-gradient(135deg, #1d3557 0%, #0f172a 100%);
    color: #fff;
    border-radius: var(--wcle-w-radius-sm);
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.3rem;
    overflow: hidden;
    box-shadow: 0 6px 20px -8px rgba(15, 23, 42, 0.5);
}
.wcle-widget-referral-card::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
    pointer-events: none;
}
.wcle-widget-referral-title {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}
.wcle-widget-referral-body {
    font-size: 0.74rem;
    opacity: 0.85;
    margin: 0 0 0.55rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}
.wcle-widget-referral-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}
.wcle-widget-referral-list li {
    padding: 0.15rem 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.wcle-widget-referral-list li::before {
    content: '✓';
    color: #4ade80;
    font-weight: 800;
    font-size: 0.9rem;
}
.wcle-widget-referral-list strong {
    color: #fff;
    font-weight: 800;
}
/* ---------- Widget share buttons (inside referral card) ---------- */
.wcle-widget-share-row {
    display: flex !important;
    gap: 0.45rem !important;
    margin: 0 0 0.55rem !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
}
.wcle-widget-share-btn {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.wcle-widget-share-btn:hover {
    transform: translateY(-1px) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #fff !important;
    text-decoration: none !important;
}
.wcle-widget-share-twitter:hover  { background: rgba(0, 0, 0, 0.6) !important; }
.wcle-widget-share-facebook:hover { background: rgba(24, 119, 242, 0.7) !important; }
.wcle-widget-share-whatsapp:hover { background: rgba(37, 211, 102, 0.7) !important; }
.wcle-widget-share-email:hover    { background: rgba(99, 102, 241, 0.7) !important; }

.wcle-widget-referral-card .wcle-widget-btn-primary {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* ---------- Redeem view ----------
 * Sub-view reached from the home menu. A dark gradient card (same
 * palette as the balance card) with a custom-styled range slider
 * for picking the discount amount, a display row showing the
 * current point/dollar preview, and an Apply button. Locked state
 * shown when the user doesn't have enough points yet.
 */
.wcle-widget-redeem-card {
    position: relative;
    background:
        radial-gradient(circle at 85% 15%, rgba(230, 57, 70, 0.3) 0%, transparent 55%),
        radial-gradient(circle at 15% 110%, rgba(124, 58, 237, 0.22) 0%, transparent 55%),
        linear-gradient(135deg, #1e3a8a 0%, var(--wcle-background) 50%, #0f172a 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 1.25rem 1.25rem 1.1rem !important;
    margin: 0 0 0.8rem !important;
    text-align: center !important;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 10px 28px -10px rgba(15, 23, 42, 0.6),
        0 4px 10px -4px rgba(29, 53, 87, 0.45) !important;
    isolation: isolate;
}
.wcle-widget-redeem-icon {
    font-size: 2rem !important;
    line-height: 1 !important;
    margin: 0 0 0.5rem !important;
    padding: 0 !important;
    color: #fff !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.wcle-widget-redeem-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    margin: 0 0 0.4rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    text-align: center !important;
}
.wcle-widget-redeem-rate {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.65) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    line-height: 1.3 !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
}
.wcle-widget-redeem-display {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.35 !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
    text-align: center !important;
}
.wcle-widget-redeem-display .wcle-widget-redeem-points,
.wcle-widget-redeem-display .wcle-widget-redeem-value {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em !important;
}
/* Custom range slider — strip native appearance and style track +
 * thumb for both WebKit and Gecko. Progress fill lives on the
 * WebKit runnable track (Firefox doesn't support a matching
 * pseudo-element the same way, so we rely on the track bg). */
.wcle-widget-panel input[type="range"].wcle-widget-redeem-slider {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 8px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 0.4rem !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: grab;
    touch-action: manipulation;
}
.wcle-widget-panel input[type="range"].wcle-widget-redeem-slider:active {
    cursor: grabbing;
}
.wcle-widget-redeem-slider::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 8px;
    background: linear-gradient(90deg, #fbbf24 0%, var(--wcle-primary) 100%);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    border: 0;
}
.wcle-widget-redeem-slider::-moz-range-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    border: 0;
}
.wcle-widget-redeem-slider::-moz-range-progress {
    height: 8px;
    background: linear-gradient(90deg, #fbbf24 0%, var(--wcle-primary) 100%);
    border-radius: 999px;
    border: 0;
}
.wcle-widget-redeem-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    margin-top: -8px; /* center on the 8px track */
    box-shadow:
        0 0 0 3px var(--wcle-primary),
        0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: grab;
    transition: transform 0.12s ease;
}
.wcle-widget-redeem-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    box-shadow:
        0 0 0 3px var(--wcle-primary),
        0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: grab;
    transition: transform 0.12s ease;
}
.wcle-widget-redeem-slider:active::-webkit-slider-thumb {
    transform: scale(1.08);
    cursor: grabbing;
}
.wcle-widget-redeem-slider:active::-moz-range-thumb {
    transform: scale(1.08);
    cursor: grabbing;
}
.wcle-widget-redeem-slider:focus-visible::-webkit-slider-thumb {
    box-shadow:
        0 0 0 3px var(--wcle-primary),
        0 0 0 5px rgba(230, 57, 70, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.4);
}
.wcle-widget-redeem-range {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.2 !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
    font-variant-numeric: tabular-nums;
}
.wcle-widget-redeem-range span {
    color: rgba(255, 255, 255, 0.6) !important;
}
.wcle-widget-redeem-card .wcle-widget-btn.wcle-widget-redeem-apply,
.wcle-widget-redeem-card .wcle-widget-redeem-apply {
    width: 100% !important;
    margin: 0 !important;
}
.wcle-widget-redeem-status {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-align: center !important;
    padding: 0.55rem !important;
    margin: 0.6rem 0 0 !important;
    border-radius: var(--wcle-w-radius-sm) !important;
    background: transparent !important;
    border: 0 !important;
    min-height: 0 !important;
}
.wcle-widget-redeem-status:empty {
    display: none !important;
}
.wcle-widget-redeem-status.is-success {
    background: rgba(34, 197, 94, 0.18) !important;
    color: #bbf7d0 !important;
    border: 1px solid rgba(74, 222, 128, 0.4) !important;
}
.wcle-widget-redeem-status.is-error {
    background: rgba(220, 38, 38, 0.18) !important;
    color: #fecaca !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
}
/* Locked state — shown instead of the slider when balance < min. */
.wcle-widget-redeem-locked {
    text-align: center !important;
    padding: 2rem 1rem !important;
    margin: 0 !important;
}
.wcle-widget-redeem-locked-icon {
    font-size: 2.5rem !important;
    line-height: 1 !important;
    margin: 0 0 0.65rem !important;
    padding: 0 !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.wcle-widget-redeem-locked-title {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
    margin: 0 0 0.4rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    text-transform: none !important;
}
.wcle-widget-redeem-locked-body {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---------- History view ----------
 * Sub-view reached from the home menu. A short list of the most
 * recent transactions (earn/spend) with a link to the full
 * dashboard, plus an empty state when there's nothing to show.
 */
.wcle-widget-history-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin: 0 0 0.9rem !important;
    padding: 0 !important;
    list-style: none !important;
}
.wcle-widget-history-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.7rem !important;
    padding: 0.7rem 0.9rem !important;
    margin: 0 !important;
    background: var(--wcle-w-surface) !important;
    background-color: var(--wcle-w-surface) !important;
    border: 1px solid var(--wcle-w-border) !important;
    border-radius: var(--wcle-w-radius-sm) !important;
    min-height: 56px !important;
    color: var(--wcle-w-text) !important;
    box-shadow: none !important;
}
.wcle-widget-history-meta {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
}
.wcle-widget-history-type {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--wcle-w-text) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.005em !important;
    margin: 0 0 0.15rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    text-transform: none !important;
}
.wcle-widget-history-date {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: var(--wcle-w-muted) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}
.wcle-widget-history-amount {
    flex: 0 0 auto !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}
.wcle-widget-history-pos .wcle-widget-history-amount {
    color: #16a34a !important;
}
.wcle-widget-history-neg .wcle-widget-history-amount {
    color: #dc2626 !important;
}
.wcle-widget-view-history .wcle-widget-btn-secondary {
    width: 100% !important;
}
/* Empty state — shown when the user has no transactions yet. */
.wcle-widget-history-empty {
    text-align: center !important;
    padding: 2rem 1rem !important;
    margin: 0 0 0.9rem !important;
}
.wcle-widget-history-empty-icon {
    font-size: 2rem !important;
    line-height: 1 !important;
    margin: 0 0 0.55rem !important;
    padding: 0 !important;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.12));
}
.wcle-widget-history-empty-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--wcle-w-text) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.005em !important;
    margin: 0 0 0.35rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    text-transform: none !important;
}
.wcle-widget-history-empty-body {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    color: var(--wcle-w-muted) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---------- Footer / company logo ---------- */
.wcle-widget-footer {
    border-top: 1px solid var(--wcle-w-border);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wcle-w-surface);
    flex: 0 0 auto;
}
.wcle-widget-logo {
    max-height: 26px;
    max-width: 50%;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.15s;
}
.wcle-widget-logo:hover { opacity: 1; }

/* ---------- Mobile / small tablet ---------- */
/* ---------- Mobile (bottom-sheet) breakpoint ----------
 * On narrow viewports the panel snaps to a full-width bottom sheet
 * with rounded top corners. Every rule uses !important because the
 * desktop rules also use !important, and without parity the desktop
 * rules win the cascade on narrow screens too. Also includes
 * env(safe-area-inset-bottom) handling for iPhone home indicator,
 * and explicit touch-target sizing so buttons are comfortable
 * under a thumb.
 */
@media (max-width: 640px) {
    /* Panel becomes a bottom sheet */
    .wcle-widget-panel {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        border-radius: var(--wcle-w-radius) var(--wcle-w-radius) 0 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
        /* On mobile we slide up from the bottom instead of scaling. */
        transform: translateY(100%) !important;
    }
    .wcle-widget-panel.is-open {
        transform: translateY(0) !important;
    }

    /* Launcher: keep it clear of the home indicator and any fixed
       bottom bars (sticky add-to-cart, cookie banner, etc.). */
    .wcle-widget-launcher {
        bottom: calc(110px + env(safe-area-inset-bottom, 0)) !important;
        font-size: 0.72rem !important;
        padding: 0.85rem 0.55rem !important;
        min-height: 48px !important;
        min-width: 48px !important;
    }

    /* Content padding tightened to maximise usable area */
    .wcle-widget-view {
        padding: 0.9rem 1rem 1.1rem !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Close + back buttons: bigger touch targets */
    .wcle-widget-close,
    .wcle-widget-back {
        width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        min-width: 40px !important;
        font-size: 1.35rem !important;
    }

    /* Header */
    .wcle-widget-header-title { font-size: 1.05rem !important; }
    .wcle-widget-avatar       { width: 84px !important; height: 84px !important; }

    /* Campaign banner — tighten padding + slightly smaller text */
    .wcle-widget-campaign-banner {
        padding: 0.6rem 0.8rem !important;
        gap: 0.55rem !important;
    }
    .wcle-widget-campaign-icon { font-size: 1.25rem !important; }
    .wcle-widget-campaign-name { font-size: 0.8rem !important; }
    .wcle-widget-campaign-detail { font-size: 0.65rem !important; }

    /* Balance card content */
    .wcle-widget-balance-card   { padding: 1rem 1.1rem 0.95rem !important; }
    .wcle-widget-balance-amount { font-size: 1.85rem !important; }
    .wcle-widget-balance-label  { font-size: 0.6rem !important; }
    .wcle-widget-balance-worth  { font-size: 0.72rem !important; padding: 0.3rem 0.55rem !important; }

    /* Integrated progress bar: taller track + bigger dot for touch */
    .wcle-widget-progress         { margin-top: 0.9rem !important; }
    .wcle-widget-progress-track   { height: 8px !important; }
    .wcle-widget-progress-dot     { width: 14px !important; height: 14px !important; }
    .wcle-widget-progress-text    { font-size: 0.7rem !important; }

    /* Welcome (logged-out) */
    .wcle-widget-welcome-title { font-size: 1.2rem !important; }
    .wcle-widget-welcome-sub   { font-size: 0.85rem !important; }
    .wcle-widget-pitch         { font-size: 0.78rem !important; }

    /* CTA buttons: ensure 48px touch targets */
    .wcle-widget-btn {
        min-height: 48px !important;
        font-size: 0.92rem !important;
        padding: 0.75rem 1rem !important;
    }

    /* Feature tiles */
    .wcle-widget-features { gap: 0.5rem !important; }
    .wcle-widget-feature  { padding: 0.6rem 0.35rem 0.55rem !important; }
    .wcle-widget-feature-icon  { width: 36px !important; height: 36px !important; font-size: 1.05rem !important; }
    .wcle-widget-feature-label { font-size: 0.68rem !important; }

    /* Rate card + earn rows — match PerkBuddy's bigger tap targets */
    .wcle-widget-rate-card   { padding: 0.85rem 0.95rem 0.9rem !important; }
    .wcle-widget-rate-title  { font-size: 0.92rem !important; }
    .wcle-widget-earn-row    {
        padding: 0.75rem 0.8rem !important;
        min-height: 56px !important;
        gap: 0.7rem !important;
    }
    .wcle-widget-earn-icon   { width: 32px !important; height: 32px !important; font-size: 0.95rem !important; }
    .wcle-widget-earn-label  { font-size: 0.82rem !important; }
    .wcle-widget-earn-value  { font-size: 0.72rem !important; }
    .wcle-widget-earn-cta    { font-size: 0.7rem !important; min-height: 24px !important; }

    /* Referral card — tighter internal padding */
    .wcle-widget-referral-card { padding: 0.85rem 0.9rem !important; }
    .wcle-widget-referral-title { font-size: 0.92rem !important; }

    /* Share buttons row inside referral card — bigger tap targets */
    .wcle-widget-share-row { gap: 0.4rem !important; margin-bottom: 0.65rem !important; }
    .wcle-widget-share-btn {
        min-height: 40px !important;
        font-size: 0.9rem !important;
    }

    /* Home menu rows — comfortable thumb targets */
    .wcle-widget-menu-item,
    .wcle-widget-panel .wcle-widget-menu-item,
    .wcle-widget-panel a.wcle-widget-menu-item,
    .wcle-widget-panel button.wcle-widget-menu-item {
        min-height: 56px !important;
        padding: 0.8rem 0.9rem !important;
    }
    .wcle-widget-menu-icon  { width: 32px !important; height: 32px !important; font-size: 1rem !important; }
    .wcle-widget-menu-label { font-size: 0.88rem !important; }

    /* Dynamic stat tiles */
    .wcle-widget-feature-stat { font-size: 0.95rem !important; }

    /* Redeem view — bigger slider thumb for touch */
    .wcle-widget-redeem-card { padding: 1.1rem 1rem !important; }
    .wcle-widget-redeem-title { font-size: 1rem !important; }
    .wcle-widget-redeem-display { font-size: 0.92rem !important; }
    .wcle-widget-redeem-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        margin-top: -10px;
    }
    .wcle-widget-redeem-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }

    /* History rows — larger tap targets */
    .wcle-widget-history-row {
        min-height: 60px !important;
        padding: 0.85rem 0.95rem !important;
    }
    .wcle-widget-history-type   { font-size: 0.88rem !important; }
    .wcle-widget-history-amount { font-size: 0.95rem !important; }

    /* Footer */
    .wcle-widget-footer { padding: 0.7rem 1rem !important; }
    .wcle-widget-logo   { max-height: 24px !important; }
}

/* Extra-narrow screens (older phones, 360px and below) */
@media (max-width: 380px) {
    .wcle-widget-balance-amount { font-size: 1.7rem !important; }
    .wcle-widget-btn { font-size: 0.86rem !important; padding: 0.7rem 0.85rem !important; }
    .wcle-widget-feature-label { font-size: 0.62rem !important; }
    .wcle-widget-earn-label { font-size: 0.78rem !important; }
    .wcle-widget-earn-value { font-size: 0.68rem !important; }
}
