/*
Theme Name: Crypto Casinos
Theme URI: https://cryptocasinoshub.org
Description: Dark, understated casino review theme. Pairs with the CCH Core plugin (casino data, shortcodes, affiliate redirects). Single language.
Version: 1.3.0
Author: Crypto Casinos Hub
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: cch
*/

/* ---- Tokens ----------------------------------------------------------- */
:root {
	--bg: #0a0c0f;
	--fg: #e7e9ec;
	--muted: #16191f;
	--muted-fg: #8b9199;
	--border: #262b33;
	--card: #12151a;
	--primary: #2ea6d8;
	--primary-hover: #47b8e6;
	--gold: #c9a24b;
	--radius: 12px;
	--wrap: 1200px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	line-height: 1.6;
	font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h3 { font-size: 1.2rem; }

.cch-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.cch-section { padding: 2.5rem 0; }
.cch-muted { color: var(--muted-fg); }
.cch-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; font-weight: 700; color: var(--muted-fg); }
.cch-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.cch-heading__bar { width: 4px; height: 1.6rem; border-radius: 999px; background: var(--primary); flex: none; }

/* ---- Buttons ---------------------------------------------------------- */
.cch-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .6rem 1rem; border-radius: 8px; border: 1px solid var(--border);
	font-weight: 600; font-size: .95rem; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s;
}
.cch-btn--primary { background: var(--primary); border-color: transparent; color: #fff; }
.cch-btn--primary:hover { background: var(--primary-hover); }
.cch-btn--outline { background: transparent; color: var(--fg); }
.cch-btn--outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Header ----------------------------------------------------------- */
.cch-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--card) 92%, transparent);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--border);
}
.cch-header__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.cch-logo { display: flex; align-items: center; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; margin-right: auto; }
.cch-logo img { height: 40px; width: auto; filter: brightness(0) invert(1); }

.cch-nav { display: flex; align-items: center; gap: .15rem; }
.cch-nav__item { position: relative; }
.cch-nav__link {
	display: inline-flex; align-items: center; gap: .35rem;
	padding: .55rem .8rem; border-radius: 8px; border: 0; background: none;
	font-weight: 600; font-size: .92rem; color: var(--fg); cursor: pointer;
	font-family: inherit; transition: background-color .15s, color .15s;
}
.cch-nav__link:hover { background: var(--muted); color: var(--primary); }
.cch-nav__link--cta { border: 1px solid var(--border); background: var(--primary); color: #fff; margin-left: .35rem; }
.cch-nav__link--cta:hover { background: var(--primary-hover); color: #fff; }
.cch-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; transition: transform .15s; }
.cch-has-drop:hover .cch-caret, .cch-has-drop.is-open .cch-caret { transform: rotate(180deg); }

/* Dropdowns */
.cch-drop {
	position: absolute; top: calc(100% + .4rem); left: 0; z-index: 60;
	min-width: 220px; padding: .4rem; border: 1px solid var(--border);
	background: var(--card); border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,.45);
	opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.cch-has-drop:hover .cch-drop, .cch-has-drop.is-open .cch-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.cch-drop--grid { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem; min-width: 420px; }
.cch-drop__link { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--fg); }
.cch-drop__link:hover { background: var(--muted); color: var(--primary); }
.cch-coin { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 24px; padding: 0 .4rem; border: 1px solid var(--border); border-radius: 6px; background: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .03em; color: var(--muted-fg); }

/* Burger (mobile only) */
.cch-burger { display: none; flex-direction: column; gap: 4px; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); cursor: pointer; }
.cch-burger span { display: block; width: 18px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---- Footer ----------------------------------------------------------- */

.cch-footer { border-top: 1px solid var(--border); background: var(--card); margin-top: 3rem; }
.cch-footer__cols { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2rem; padding: 2.75rem 0; }
.cch-footer__brand { max-width: 360px; }
.cch-footer__logo { height: 44px; width: auto; filter: brightness(0) invert(1); margin-bottom: .85rem; }
.cch-footer__rg { font-size: .82rem; margin-top: .85rem; }
.cch-footer h4 { text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.cch-footer ul { list-style: none; margin: 0; padding: 0; }
.cch-footer li { margin: .4rem 0; }
.cch-footer a { color: var(--muted-fg); }
.cch-footer a:hover { color: var(--fg); }
.cch-footer__bottom { border-top: 1px solid var(--border); padding: 1rem 0; font-size: .85rem; color: var(--muted-fg); }

/* ---- Stars / rating / promo ------------------------------------------ */
.cch-stars { position: relative; display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 1px; }
.cch-stars__track { color: rgba(255,255,255,.15); }
.cch-stars__fill { position: absolute; inset: 0; overflow: hidden; white-space: nowrap; color: var(--gold); }
.cch-stars--lg { font-size: 1.3rem; }
.cch-rating-box { display: inline-flex; align-items: center; padding: .1rem .5rem; border: 1px solid var(--border); border-radius: 6px; font-weight: 800; font-size: 1.1rem; }

.cch-promo { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: .5rem .7rem; }
.cch-promo__row { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.cch-promo code { flex: 1; padding: .35rem .6rem; background: var(--muted); border: 1px solid var(--border); border-radius: 6px; font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: .05em; }
.cch-promo__copy { border: 1px solid var(--border); background: var(--primary); color: #fff; border-radius: 6px; padding: .35rem .7rem; font-weight: 700; cursor: pointer; }
.cch-promo__copy.is-copied { background: #3f9d6b; }

/* ---- Casino card ------------------------------------------------------ */
.cch-list { display: grid; gap: 1rem; margin: 1.5rem 0; }
.cch-card { position: relative; display: grid; grid-template-columns: 220px 1fr; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); overflow: hidden; }
.cch-card__rank { position: absolute; top: .5rem; left: .5rem; z-index: 2; font-weight: 800; font-size: .8rem; color: var(--muted-fg); }
.cch-card__aside { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 1.25rem; background: var(--muted); border-right: 1px solid var(--border); }
.cch-card__logo { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; padding: .5rem; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.cch-card__logo-fallback { font-weight: 700; }
.cch-card__score { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.cch-card__main { padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.cch-card__title { margin: 0; font-size: 1.3rem; }
.cch-card__title a:hover { color: var(--primary); }
.cch-card__summary { margin: 0; color: var(--muted-fg); font-size: .9rem; }
.cch-card__bonus { border: 1px solid var(--border); background: var(--muted); border-radius: 8px; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .1rem; }
.cch-card__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.cch-stat { border: 1px solid var(--border); border-radius: 8px; padding: .4rem .6rem; display: flex; flex-direction: column; gap: .1rem; }
.cch-stat__label { font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); }
.cch-stat__value { font-weight: 700; font-size: .9rem; }
.cch-card__cta { display: flex; gap: .5rem; margin-top: auto; }
.cch-card__cta .cch-btn { flex: 1; }

/* ---- Review page ------------------------------------------------------ */
.cch-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--muted); }
.cch-hero__glow { position: absolute; top: -6rem; right: -6rem; width: 24rem; height: 24rem; border-radius: 50%; background: var(--primary); opacity: .06; filter: blur(60px); pointer-events: none; }
.cch-hero__inner { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 1.5rem; padding: 2.5rem 0; }
.cch-hero__logo { width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; padding: .75rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.cch-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1rem 0; }
.cch-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.cch-badge { border: 1px solid var(--border); background: var(--muted); color: var(--muted-fg); border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; font-weight: 600; }
.cch-trust { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); border-radius: 8px; padding: .35rem .6rem; font-size: .85rem; }
.cch-trust__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

.cch-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; padding: 2.5rem 0; align-items: start; }
.cch-panel { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.cch-panel h3 { margin-top: 0; }
.cch-ratings { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; }
.cch-ratings__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }

.cch-prose { line-height: 1.75; }
.cch-prose h2 { margin-top: 2rem; }
.cch-prose h3 { margin-top: 1.5rem; }
.cch-prose ul { padding-left: 1.25rem; }
.cch-prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
.cch-prose th, .cch-prose td { border: 1px solid var(--border); padding: .5rem .75rem; text-align: left; }
.cch-prose th { background: var(--muted); }

.cch-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.cch-proscons ul { list-style: none; padding: 0; margin: 0; }
.cch-proscons li { padding: .3rem 0 .3rem 1.5rem; position: relative; }
.cch-pros li::before { content: "+"; position: absolute; left: 0; color: #3f9d6b; font-weight: 800; }
.cch-cons li::before { content: "−"; position: absolute; left: 0; color: #d0574f; font-weight: 800; }

.cch-taglist { display: flex; flex-wrap: wrap; gap: .4rem; }
.cch-glance { list-style: none; margin: 0; padding: 0; }
.cch-glance li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.cch-glance li span:first-child { color: var(--muted-fg); }

/* ---- FAQ -------------------------------------------------------------- */
.cch-faq details { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.cch-faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.cch-faq summary::-webkit-details-marker { display: none; }
.cch-faq p { color: var(--muted-fg); margin: .5rem 0 0; }

/* ---- Reviews (comments) ----------------------------------------------- */
.cch-review { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: .75rem; }
.cch-review__head { display: flex; align-items: center; gap: .75rem; margin-bottom: .35rem; }
.cch-review-rating select, .comment-form input, .comment-form textarea { background: var(--muted); border: 1px solid var(--border); color: var(--fg); border-radius: 6px; padding: .5rem; }

/* ---- Converter -------------------------------------------------------- */
.cch-converter { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 1.25rem; }
.cch-converter__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cch-converter input, .cch-converter select { background: var(--muted); border: 1px solid var(--border); color: var(--fg); border-radius: 6px; padding: .5rem; }
.cch-converter__result { min-width: 8rem; font-weight: 700; }
.cch-converter__note { color: var(--muted-fg); font-size: .8rem; margin: .75rem 0 0; }

/* ---- Landing pages (currency / bonus / home) -------------------------- */
.cch-hero--landing .cch-section { padding: 3rem 0 2.25rem; }
.cch-hero__badge { display: inline-block; margin-bottom: .9rem; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--primary); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cch-hero__sub { max-width: 46rem; font-size: 1.05rem; margin: .5rem 0 0; }

.cch-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cch-highlight { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.cch-highlight h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.cch-highlight p { margin: 0; font-size: .9rem; }

.cch-coinchips { display: flex; flex-wrap: wrap; gap: .5rem; }
.cch-coinchip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .8rem; border: 1px solid var(--border); background: var(--card); border-radius: 999px; font-weight: 600; font-size: .9rem; }
.cch-coinchip:hover { border-color: var(--primary); color: var(--primary); }

/* Compact casino grid ([[casinos-grid:...]]) */
.cch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.cch-gcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 1.1rem 1rem; }
.cch-gcard__logo { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; padding: .4rem; background: var(--muted); border: 1px solid var(--border); border-radius: 10px; font-weight: 700; }
.cch-gcard__title { margin: 0; font-size: 1.05rem; }
.cch-gcard__title a:hover { color: var(--primary); }
.cch-gcard__score { display: flex; align-items: center; gap: .5rem; }
.cch-gcard .cch-btn { width: 100%; }

/* Bonus comparison table ([[bonuses:...]]) */
.cch-btable-wrap { overflow-x: auto; margin: 1.5rem 0; }
.cch-btable { width: 100%; border-collapse: collapse; }
.cch-btable th, .cch-btable td { border: 1px solid var(--border); padding: .7rem .8rem; text-align: left; vertical-align: middle; }
.cch-btable th { background: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); }
.cch-btable__casino a { font-weight: 700; }
.cch-btable__casino a:hover { color: var(--primary); }
.cch-btable code { padding: .2rem .45rem; background: var(--muted); border: 1px solid var(--border); border-radius: 6px; font-family: ui-monospace, monospace; font-weight: 700; }
.cch-btable .cch-btn { white-space: nowrap; }

.cch-disclaimer { font-size: .82rem; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.cch-faq__a { color: var(--muted-fg); margin-top: .5rem; }
.cch-faq__a p { margin: .5rem 0; }
.cch-faq__a a { color: var(--primary); }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
	.cch-layout { grid-template-columns: 1fr; }
	.cch-footer__cols { grid-template-columns: 1fr 1fr; }
	.cch-footer__brand { grid-column: 1 / -1; max-width: none; }
	.cch-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.cch-burger { display: flex; }
	.cch-nav {
		position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: .1rem;
		max-height: calc(100vh - 72px); overflow-y: auto; padding: .75rem 1rem 1.25rem;
		background: var(--card); border-bottom: 1px solid var(--border);
		transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s;
	}
	.cch-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
	.cch-nav__item { width: 100%; }
	.cch-nav__link { width: 100%; justify-content: space-between; padding: .8rem .6rem; }
	.cch-nav__link--cta { justify-content: center; margin: .4rem 0 0; }
	.cch-drop {
		position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
		display: none; min-width: 0; width: 100%; margin: .1rem 0 .4rem; background: var(--muted);
	}
	.cch-drop--grid { grid-template-columns: 1fr 1fr; min-width: 0; }
	.cch-has-drop.is-open .cch-drop { display: grid; }
	body.cch-nav-open { overflow: hidden; }
}
@media (max-width: 640px) {
	.cch-card { grid-template-columns: 1fr; }
	.cch-card__aside { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); }
	.cch-hero__inner { grid-template-columns: 1fr; }
	.cch-card__stats { grid-template-columns: 1fr 1fr; }
	.cch-proscons, .cch-ratings { grid-template-columns: 1fr; }
	.cch-drop--grid { grid-template-columns: 1fr; }
}
