/* Bionic Commerce — "Match my theme" skin. Loaded after front.css only when Style = Match my theme.
   Colours, fonts and button shape come from the active theme: block themes via their theme.json variables,
   every theme via the small probe in front.js that reads the theme's own button and heading styles
   and publishes them as --bn-t-* variables on <html>. Everything has a sensible fallback without JS. */

body.bionic-style-theme .bn {
    --bn-ink: currentColor;
    --bn-paper: transparent;
    --bn-card: color-mix(in srgb, currentColor 4%, transparent);
    --bn-line: color-mix(in srgb, currentColor 16%, transparent);
    --bn-muted: color-mix(in srgb, currentColor 62%, transparent);
    --bn-media: color-mix(in srgb, currentColor 8%, transparent);
    --bn-gold: var(--bn-t-accent, var(--bn-accent, #b08d57));
    --bn-btn-bg: var(--bn-t-btn-bg, var(--wp--preset--color--contrast, #1d1d1d));
    --bn-btn-fg: var(--bn-t-btn-fg, var(--wp--preset--color--base, #ffffff));
    --bn-radius: var(--bn-t-radius, 0px);
    --bn-card-radius: min(var(--bn-radius), 14px);
    background: transparent; color: inherit;
    font-family: inherit; font-size: var(--bn-fs-body, inherit); line-height: inherit; font-weight: inherit; letter-spacing: inherit;
    -webkit-font-smoothing: inherit;
}

/* Same width as the theme's "wide" blocks; no boxed padding so edges line up with the theme. */
body.bionic-style-theme:not(.bionic-classic) .bn.bn.bn.bn { width: min(var(--wp--style--global--wide-size, 1180px), calc(100vw - 2.5rem)); }

/* Type: the theme's body font everywhere, the theme's heading font on headings and prices. */
body.bionic-style-theme .bn :is(h1, h2, h3),
body.bionic-style-theme .bn :is(.bn-price, .bn-line-name, .bn-line-price, .bn-total, .bn-stat, .bn-portal-user strong, .bn-avatar) {
    font-family: var(--bn-t-heading-font, inherit);
    font-weight: var(--bn-t-heading-weight, 600);
}
body.bionic-style-theme .bn :is(h1, h2) { letter-spacing: var(--bn-t-heading-ls, normal); text-transform: var(--bn-t-heading-tt, none); }
body.bionic-style-theme .bn :is(h1, h2, h3) { color: var(--bn-t-heading-color, inherit); }
body.bionic-style-theme .bn .bn-price-free { font-style: normal; }
/* Small-caps labels keep their role but lose the extra-wide tracking. */
body.bionic-style-theme .bn :is(.bn-eyebrow, .bn-field label, .bn-table th, .bn-chip, .bn-specs dt, .bn-status, .bn-tabs a, .bn-soon, .bn-badge) {
    font-family: inherit; letter-spacing: .08em;
}

/* Buttons: take the theme's own button colours, radius, weight and size. */
body.bionic-style-theme .bn .bn-btn,
body.bionic-style-theme .bn a.bn-btn {
    font-family: var(--bn-t-btn-font, inherit); font-size: var(--bn-fs-button, var(--bn-t-btn-size, .95rem)); font-weight: var(--bn-t-btn-weight, 600); line-height: 1.2;
    letter-spacing: var(--bn-t-btn-ls, normal); text-transform: var(--bn-t-btn-tt, none);
    padding: var(--bn-t-btn-pad, .85rem 1.5rem);
    border-radius: var(--bn-radius); border: 1px solid var(--bn-ink); background: transparent; color: inherit;
}
body.bionic-style-theme .bn .bn-btn:hover,
body.bionic-style-theme .bn a.bn-btn:hover { background: var(--bn-btn-bg); border-color: var(--bn-btn-bg); color: var(--bn-btn-fg); }
body.bionic-style-theme .bn .bn-btn-solid,
body.bionic-style-theme .bn a.bn-btn-solid { background: var(--bn-btn-bg); border-color: var(--bn-btn-bg); color: var(--bn-btn-fg); }
body.bionic-style-theme .bn .bn-btn-solid:hover,
body.bionic-style-theme .bn a.bn-btn-solid:hover { background: var(--bn-btn-bg); border-color: var(--bn-btn-bg); color: var(--bn-btn-fg); opacity: .88; }
body.bionic-style-theme .bn .bn-btn.is-added,
body.bionic-style-theme .bn a.bn-btn.is-added,
body.bionic-style-theme .bn a.bn-btn.is-added:hover { background: var(--bn-btn-bg); border-color: var(--bn-btn-bg); color: var(--bn-btn-fg); opacity: 1; }

/* Spots that used ink-on-paper inversions. */
body.bionic-style-theme .bn :is(.bn-badge, .bn-testbar, .bn-avatar) { background: var(--bn-btn-bg); color: var(--bn-btn-fg); }
body.bionic-style-theme .bn .bn-badge { border-radius: var(--bn-card-radius); font-size: 11px; }

/* Shape: soft corners follow the theme's button radius (capped so cards never turn into pills). */
body.bionic-style-theme .bn :is(.bn-card, .bn-lines, .bn-summary, .bn-auth-card, .bn-portal-nav, .bn-payment, .bn-table, .bn-note, .bn-alert, .bn-single-media, .bn-empty-sm) { border-radius: var(--bn-card-radius); }
body.bionic-style-theme .bn .bn-card { overflow: hidden; }
body.bionic-style-theme .bn .bn-table { overflow: hidden; border-collapse: separate; border-spacing: 0; }
body.bionic-style-theme .bn :is(.bn-field input, .bn-field select, .bn-field textarea, .bn-sort select) { border-radius: var(--bn-radius); background: transparent; }
body.bionic-style-theme .bn :is(.bn-chip, .bn-status) { border-radius: var(--bn-radius); }
body.bionic-style-theme .bn :is(.bn-line-img) { border-radius: var(--bn-card-radius); }
body.bionic-style-theme .bn .bn-card:hover { transform: none; box-shadow: 0 10px 30px -18px color-mix(in srgb, currentColor 50%, transparent); }
