/*
Theme Name: BR Flagship
Theme URI: https://kryptospieler.de
Author: Patrick Spreitzhofer
Description: Authority theme for the English crypto-casino comparison sites (blockrollers.com and siblings): near-black, electric-blue accent, table-first hero, sticky compare sidebar. Requires Crypto Affiliate Core.
Version: 1.1.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: br-flagship
*/

/* Palette comes from theme.json, overridden per site by the plugin (CAC_Theme::palette_css). Map to plugin component vars. */
:root {
  --cac-accent: var(--wp--preset--color--accent);
  --cac-accent-fg: var(--wp--preset--color--accent-contrast);
  --cac-bg: var(--wp--preset--color--surface);
  --cac-bg-2: var(--wp--preset--color--surface-2);
  --cac-fg: var(--wp--preset--color--base);
  --cac-muted: var(--wp--preset--color--muted);
  --cac-border: var(--wp--preset--color--border);
  --cac-radius: 10px;
  --cac-shadow: 0 10px 30px rgba(0,0,0,.35);
}
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .15em; }
img { max-width: 100%; height: auto; }

/* Header */
.br-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--wp--preset--color--background) 85%, transparent); border-bottom: 1px solid var(--wp--preset--color--border); }
.br-header .wp-block-site-logo img { height: 72px; width: auto; border-radius: 8px; }
.br-header .wp-block-navigation a { font-weight: 600; }
.br-header .wp-block-navigation { font-size: .9rem; }
.br-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent); }

/* Hero */
.br-hero { position: relative; overflow: hidden; border-radius: 24px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); }
.br-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; }
.br-kicker { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--accent); font-weight: 700; margin-bottom: 1em; }
.br-kicker:empty { display: none; }
.cac-trust, .br-trust { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: .85rem; color: var(--wp--preset--color--muted); margin-top: 1.4rem; }
.cac-trust span::before { content: "✓"; color: var(--wp--preset--color--secondary); font-weight: 800; margin-right: .4em; }
.br-meta { color: var(--wp--preset--color--muted); margin-bottom: 1rem; }

/* Content width + typography */
.entry-content > * { max-width: var(--wp--style--global--content-size); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide, .entry-content > .cac-toplist, .entry-content > .cac-table-wrap, .entry-content > .cac-compare { max-width: var(--wp--style--global--wide-size); }
.entry-content h2 { margin-top: 2.2em; padding-top: .2em; }
.entry-content h2::before { content: ""; display: block; width: 48px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--wp--preset--color--accent), var(--wp--preset--color--secondary)); margin-bottom: .6em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95em; }
.entry-content table th, .entry-content table td { padding: .6em .8em; border-bottom: 1px solid var(--wp--preset--color--border); text-align: left; vertical-align: top; }
.entry-content table thead th { background: var(--wp--preset--color--surface-2); }
.entry-content .wp-block-table { overflow-x: auto; }

/* Plugin components on dark surfaces */
.cac-card, .cac-review, .cac-faq__item, .cac-table-wrap { background: var(--wp--preset--color--surface); }
.cac-card:first-child { box-shadow: 0 0 0 1px var(--wp--preset--color--accent), 0 18px 40px color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent); }
.cac-score em { background: var(--wp--preset--color--surface-2); }
.cac-btn--primary { color: var(--wp--preset--color--accent-contrast); }
.cac-disclosure { border-left-color: var(--wp--preset--color--accent); }
.cac-rg { color: var(--wp--preset--color--muted); }
.cac-sticky { background: var(--wp--preset--color--surface); border-top-color: var(--wp--preset--color--border); }

/* Sidebar cards / boxes */
.br-aside { position: sticky; top: 90px; }
.br-box { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 10px; padding: 1.2rem 1.3rem; }
.br-box h3 { margin: 0 0 .6em; font-size: 1rem; }

/* Footer */
.br-footer { border-top: 1px solid var(--wp--preset--color--border); margin-top: 4rem; font-size: .9rem; color: var(--wp--preset--color--muted); }
.br-footer a { color: var(--wp--preset--color--base); }
.br-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35em; }
.br-footer .cac-disclosure { margin-top: 1rem; }
.ks-age, .cac-footer-note .ks-age { display: inline-grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; border: 2px solid #e04343; color: #e04343; font-weight: 800; margin-right: .4em; }
.cac-footer-note { padding-bottom: 1.5rem; }

@media (max-width: 782px) {
  .br-header .wp-block-site-logo img { height: 52px; }
  .br-hero { border-radius: 16px; }
  .br-aside { position: static; }
}

/* Variant: data grid hero (blueprint lines) */
.br-hero--grid { background-image: linear-gradient(color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent) 1px, transparent 1px); background-size: 40px 40px; background-color: var(--wp--preset--color--surface); border-radius: 12px; }
.br-hero--grid::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--wp--preset--color--surface) 100%); pointer-events: none; }
.br-hero--grid > * { position: relative; z-index: 1; }
.br-hero--grid h1 { font-family: var(--wp--preset--font-family--display); letter-spacing: -.03em; }
.cac-table thead th { letter-spacing: .08em; }
.cac-card { border-radius: 10px; }
.cac-btn { border-radius: 8px; }
.br-header { border-bottom: 2px solid var(--wp--preset--color--accent); }
