/*
Theme Name: OP Toplist
Theme URI: https://kryptospieler.de
Author: Patrick Spreitzhofer
Description: One-pager landing theme for toplist domains (coinzocken.de, satoshireels.online …): full-width hero, toplist above the fold, anchor navigation, no sidebar, big CTAs. Requires Crypto Affiliate Core.
Version: 1.2.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: op-toplist
*/

/* 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: 20px;
  --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 */
.op-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); }
.op-header .wp-block-site-logo img { height: 72px; width: auto; border-radius: 8px; }
.op-header .wp-block-navigation a { font-weight: 600; }
.op-header .wp-block-navigation { font-size: .9rem; }
.op-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent); }

/* Hero */
.op-hero { position: relative; overflow: hidden; border-radius: 24px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); }
.op-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; }
.op-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; }
.op-kicker:empty { display: none; }
.cac-trust, .op-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; }
.op-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 */
.op-aside { position: sticky; top: 90px; }
.op-box { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 20px; padding: 1.2rem 1.3rem; }
.op-box h3 { margin: 0 0 .6em; font-size: 1rem; }

/* Footer */
.op-footer { border-top: 1px solid var(--wp--preset--color--border); margin-top: 4rem; font-size: .9rem; color: var(--wp--preset--color--muted); }
.op-footer a { color: var(--wp--preset--color--base); }
.op-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35em; }
.op-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; }

/* Mobile navigation: labelled hamburger button + opaque overlay */
.op-header .wp-block-navigation__responsive-container-open { align-items: center; gap: .45em; padding: .45em .8em; border: 1px solid var(--wp--preset--color--accent); border-radius: 8px; color: var(--wp--preset--color--accent); font-weight: 700; font-size: .9rem; }
.op-header .wp-block-navigation__responsive-container-open::after { content: "Menu"; }
.op-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--surface) !important; color: var(--wp--preset--color--base) !important; padding: 1.5rem; }
.op-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { font-size: 1.15rem; }
.op-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--base); }
@media (max-width: 782px) {
  .op-header .wp-block-site-logo img { height: 52px; }
  .op-header > .wp-block-group { flex-wrap: nowrap; justify-content: space-between; align-items: center; }
  .op-hero { border-radius: 16px; }
  .op-aside { position: static; }
}

/* Variant: bold one-pager hero (diagonal brand band, centered) */
.op-hero--bold { text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--wp--preset--color--accent) 28%, var(--wp--preset--color--surface)) 0%, var(--wp--preset--color--surface) 55%, color-mix(in srgb, var(--wp--preset--color--secondary) 18%, var(--wp--preset--color--surface)) 100%); }
.op-hero--bold .wp-block-group__inner-container, .op-hero--bold > * { margin-left: auto; margin-right: auto; }
.op-hero--bold h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.op-hero--bold .cac-trust { justify-content: center; }
.cac-card { border-radius: 20px; }
.cac-btn--primary { font-size: 1.05em; padding: .9em 1.6em; }
.cac-card:first-child::before { content: "★"; position: absolute; right: 14px; top: -12px; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent-contrast); font-size: .8em; padding: .25em .6em; border-radius: 999px; }
.op-header .wp-block-navigation { font-weight: 700; }
.entry-content h2 { text-align: center; }
.entry-content h2::before { margin-left: auto; margin-right: auto; }
