/*
Theme Name: ADB
Theme URI: https://air-dice-be.com/
Author: air-dice-be.com
Author URI: https://air-dice-be.com/
Description: Custom theme specially developed for air-dice-be.com.
Version: 1.0.0
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.5
License: GPL-2.0-or-later
Text Domain: adb
*/

/* ADB — clean UI: black canvas, white type, red accent, rounded tiles, pill tags. */
@layer reset, base, layout, components, blocks;

:root {
	color-scheme: dark;
	--bg: var(--wp--preset--color--bg, #000000);
	--panel: var(--wp--preset--color--panel, #0e0e0e);
	--line: var(--wp--preset--color--line, #2a2a2a);
	--text: var(--wp--preset--color--text, #f2f2f2);
	--muted: var(--wp--preset--color--muted, #b3b3b3);
	--red: var(--wp--preset--color--red, #d90000);
	--deep: var(--wp--preset--color--deep, #810102);
	--link: var(--wp--preset--color--link, #ff6b6b);
	--font: var(--wp--preset--font-family--body, Rajdhani, Bahnschrift, "Segoe UI", system-ui, sans-serif);
	--w: 72rem;
	--r: 15px;
}

@layer reset {
	*, *::before, *::after { box-sizing: border-box; }
	body { margin: 0; min-block-size: 100dvh; display: flex; flex-direction: column; }
	main { flex: 1; padding-block-end: 4rem; }
	img, svg, video, iframe { max-inline-size: 100%; block-size: auto; }
	ul, ol { padding: 0; margin: 0; list-style: none; }
	h1, h2, h3, p { margin-block: 0 1rem; }
	:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
	@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
}

@layer base {
	body { font-weight: 500; }
	h1, h2, h3, h4 { color: #fff; font-weight: 600; line-height: 1.15; text-wrap: balance; }
	h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); text-transform: uppercase; letter-spacing: .02em; }
	h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); text-transform: uppercase; letter-spacing: .03em; }
	h3 { font-size: 1.25rem; }
	p, li { text-wrap: pretty; }
	a { color: var(--link); text-underline-offset: .18em; &:hover { color: #fff; } }
	.skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; background: var(--red); color: #fff; padding: .5rem 1rem; border-radius: 999px; z-index: 10; &:focus { inset-block-start: 1rem; } }
	.center { text-align: center; }
}

@layer layout {
	.wrap { inline-size: min(100% - 2rem, var(--w)); margin-inline: auto; }

	/* Header: logo + nav only */
	.site-header {
		position: sticky; inset-block-start: 0; z-index: 5; background: rgb(0 0 0 / .92); backdrop-filter: blur(8px); border-block-end: 1px solid var(--line);
		.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 4.25rem; }
	}
	.brand {
		display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; font-size: 1.5rem; font-weight: 500; letter-spacing: .28em; text-transform: lowercase;
		&:hover { color: #fff; }
		.dice { inline-size: 2.25rem; block-size: auto; flex: none; }
		.custom-logo { max-block-size: 2.5rem; inline-size: auto; }
	}

	.burger {
		anchor-name: --burger; inline-size: 2.75rem; block-size: 2.75rem; background: none; border: 0; cursor: pointer; display: grid; place-content: center;
		&::before { content: ""; inline-size: 1.5rem; block-size: 2px; background: #fff; box-shadow: 0 -7px #fff, 0 7px #fff; }
	}
	#nav {
		inset: auto; position: fixed; position-anchor: --burger; inset-block-start: anchor(bottom); inset-inline: 0; margin: 0; padding: .5rem 1rem 1rem;
		background: #000; color: #fff; border: 0; border-block-end: 1px solid var(--line);
		.menu { display: grid; }
		a { display: block; padding: .85rem 0; color: #fff; text-decoration: none; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; border-block-end: 1px solid var(--line); }
		a:hover, a[aria-current="page"] { color: var(--red); }
	}
	@media (min-width: 60rem) {
		.burger { display: none; }
		#nav {
			display: block; position: static; inset: auto; inline-size: auto; padding: 0; background: none; border: 0; overflow: visible;
			.menu { display: flex; gap: .25rem; }
			a { padding: .5rem 1rem; font-size: .9375rem; border: 0; border-radius: 999px; }
			a:hover { background: var(--panel); color: #fff; }
			a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px var(--red); border-radius: 0; }
		}
	}

	.site-footer {
		background: var(--deep); color: #f3d6d6; padding-block: 3rem 2rem; font-size: .95rem;
		h2 { font-size: .95rem; color: #fff; }
		a { color: #f3d6d6; text-decoration: none; &:hover { color: #fff; text-decoration: underline; } }
		.menu { display: grid; gap: .45rem; }
		.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2rem; }
		.legal { margin-block-start: 2rem; padding-block-start: 1.25rem; border-block-start: 1px solid rgb(255 255 255 / .2); font-size: .85rem; p { margin-block-end: .4rem; } }
		.age { display: inline-block; border: 2px solid #fff; color: #fff; border-radius: 999px; padding: 0 .55rem; margin-inline-end: .5rem; }
	}
}

@layer components {
	/* Hero */
	.hero { text-align: center; padding-block: clamp(3rem, 8vw, 6rem) 2.5rem; background: radial-gradient(ellipse 60% 80% at 50% 0, rgb(217 0 0 / .35), transparent 70%), #000; border-block-end: 1px solid var(--line); }
	.eyebrow { display: inline-block; font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-block-end: 1rem; }
	.hero h1 { font-size: clamp(2.25rem, 1rem + 5.5vw, 4.5rem); max-inline-size: 18ch; margin-inline: auto; }
	.lead { max-inline-size: 40rem; margin-inline: auto; font-size: 1.15rem; color: var(--muted); }
	.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-block: 1.5rem; }

	.searchbox {
		display: flex; max-inline-size: 32rem; margin: 1.5rem auto; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .25rem;
		&:focus-within { border-color: var(--red); }
		input { flex: 1; min-inline-size: 0; padding: .6rem 1.1rem; font: inherit; border: 0; background: none; color: #fff; &:focus-visible { outline: 0; } }
		button { padding: 0 1.4rem; border: 0; border-radius: 999px; background: var(--red); color: #fff; font: 700 .9rem var(--font); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; &:hover { background: #fff; color: #000; } }
	}

	.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3rem; margin-block: 2rem 1rem; }
	.stat { display: grid; }
	.stat b { font-size: clamp(2rem, 1rem + 3vw, 2.75rem); font-weight: 700; line-height: 1; color: #fff; }
	.stat span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-block-start: .35rem; }
	.note { font-size: .85rem; color: var(--muted); margin: 0; }

	/* Sections */
	.sec { margin-block: 3rem; }
	.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-block-end: 1.25rem; h2 { margin: 0; } a { font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--red); text-decoration: none; &:hover { color: #fff; } } }

	.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
	.chip, .tag { display: inline-block; padding: .15rem .8rem; border: 1px solid var(--red); border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 600; text-decoration: none; text-transform: capitalize; }
	a.chip:hover { background: var(--red); color: #fff; }

	.btn, .wp-block-button__link, .comment-form .submit, .search-submit {
		display: inline-block; padding: .7rem 1.6rem; background: var(--red); color: #fff; border: 2px solid var(--red); border-radius: 999px;
		font: 700 .95rem var(--font); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
		&:hover { background: #fff; border-color: #fff; color: #000; }
		&.alt { background: none; border-color: #fff; &:hover { background: #fff; color: #000; } }
	}

	/* Panels */
	.page, .comments, .facts, .demo, .panel, .filters { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; margin-block-end: 1.5rem; }
	.page { margin-block-start: 1.5rem; }
	.page h1 { margin-block-end: 1.25rem; }
	.page > .entry > :last-child { margin-block-end: 0; }

	.crumbs { padding-block-start: 1.25rem; font-size: .875rem; margin-block-end: .5rem; ol { display: flex; flex-wrap: wrap; gap: .4rem; } li:not(:last-child)::after { content: "/"; margin-inline-start: .4rem; color: var(--muted); } a { color: var(--muted); &:hover { color: #fff; } } [aria-current] { color: #fff; } }

	/* Games */
	.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 1.5rem 1.25rem; margin-block: 1.25rem; }
	.card {
		text-align: center;
		a { display: grid; justify-items: center; gap: .6rem; color: #fff; text-decoration: none; }
		img, .ph { inline-size: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); transition: transform .2s, border-color .2s; }
		.ph { display: grid; place-content: center; font-size: 3rem; color: var(--muted); }
		a:hover img, a:hover .ph, a:focus-visible img { transform: translateY(-4px); border-color: var(--red); }
		.t { font-size: 1.05rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
		.tag { color: #fff; }
	}

	search { display: block; }
	.filters {
		display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; padding: 1rem 1.25rem;
		label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
		select, input[type="search"], .comment-form :is(input, textarea) { font: 1rem var(--font); padding: .55rem .9rem; background: #000; color: #fff; border: 1px solid var(--line); border-radius: 10px; min-inline-size: 9rem; &:focus-visible { border-color: var(--red); outline: 0; } }
	}
	.more { text-align: center; margin-block: 2rem; p { color: var(--muted); } }

	.game h1 { margin-block-end: 1rem; }
	.demo { padding: .5rem; iframe { inline-size: 100%; border-radius: 10px; } }
	.facts {
		dl { display: grid; gap: .6rem; margin: 0; }
		dl > div { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; border-block-end: 1px solid var(--line); padding-block-end: .6rem; }
		dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-inline-size: 8rem; }
		dd { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
	}

	.entry {
		h2 { margin-block-start: 1.75rem; }
		table { inline-size: 100%; border-collapse: collapse; }
		:is(th, td) { padding: .65rem .85rem; border: 1px solid var(--line); text-align: start; }
		th { background: #1a1a1a; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
		.alignwide, .alignfull { max-inline-size: none; }
	}

	.posts { display: grid; gap: 1rem; }
	.comments { ol { display: grid; gap: 1rem; margin-block-end: 1.5rem; } .comment-body { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; } .comment-form { display: grid; gap: 1rem; } }
	.big404 { font-size: clamp(5rem, 20vw, 9rem); font-weight: 700; line-height: 1; color: var(--red); margin: 0; }
	.pagination .nav-links { display: flex; gap: .4rem; justify-content: center; }
	.page-numbers { padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: #fff; text-decoration: none; &.current { background: var(--red); border-color: var(--red); } }
}

@layer blocks {
	.wp-block-quote { border-inline-start: 3px solid var(--red); padding-inline-start: 1rem; margin-inline: 0; color: var(--muted); }
	.wp-block-columns { gap: 1.25rem; }
	.wp-block-image img { border-radius: var(--r); }
}
/* Game page (toutslots-style layout) + Belgian help block */
@layer components {
	.game-hero { text-align: center; padding-block: 1.5rem 2rem; }
	.game-hero .eyebrow { margin-block-end: .5rem; a { color: inherit; text-decoration: none; &:hover { color: #fff; } } }
	.game-hero h1 { font-size: clamp(2.25rem, 1rem + 5vw, 4rem); margin-block-end: 1rem; }
	.game-hero .lead { margin-block-end: 1.25rem; }
	.demo { scroll-margin-block-start: 6rem; }
	.about {
		background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; margin-block: 2rem;
		.specs { display: grid; gap: .6rem; margin: 0 0 1.25rem; }
		.specs > div { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; border-block-end: 1px solid var(--line); padding-block-end: .6rem; }
		dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-inline-size: 8rem; }
		dd { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
		p:last-child { margin-block-end: 0; }
	}
}
@layer layout {
	.site-footer .help {
		display: grid; gap: 1.5rem; align-items: center; margin-block-end: 2.5rem; padding: 1.5rem; border: 1px solid rgb(255 255 255 / .25); border-radius: var(--r); background: rgb(0 0 0 / .2);
		h2 { font-size: 1.25rem; margin-block-end: .5rem; }
		p { margin: 0; color: #f3d6d6; }
		ul { display: grid; gap: .75rem; }
		li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
		.btn.alt { color: #fff; }
		.btn.alt:hover { color: #000; }
		@media (min-width: 52rem) { grid-template-columns: 1.2fr 1fr; }
	}
}
/* Extra templates: sitemap, contact form (Contact Form 7), narrow default page, search form */
@layer components {
	.sitemap { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem 2rem; margin-block-start: 1.5rem; }
	.sitemap h2 { font-size: 1.1rem; margin-block-start: 0; }
	.sitemap .menu { display: grid; gap: .35rem; }
	.sitemap .menu ul { margin-inline-start: 1rem; padding-block-start: .35rem; display: grid; gap: .35rem; }
	.sitemap-games { grid-column: 1 / -1; .menu { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); } }
	.sitemap small { color: var(--muted); }

	.page-wide .page > .entry > * { max-inline-size: none; }
	.page-narrow { --w: 52rem; }

	.wpcf7 {
		form { display: grid; gap: 1rem; }
		label { display: grid; gap: .3rem; font-weight: 600; }
		:is(input:not([type="submit"], [type="checkbox"], [type="radio"]), textarea, select) { inline-size: 100%; font: 1rem var(--font); padding: .65rem .9rem; background: #000; color: #fff; border: 1px solid var(--line); border-radius: 10px; &:focus-visible { border-color: var(--red); outline: 0; } }
		input[type="submit"] { justify-self: start; padding: .7rem 1.6rem; background: var(--red); color: #fff; border: 2px solid var(--red); border-radius: 999px; font: 700 .95rem var(--font); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; &:hover { background: #fff; border-color: #fff; color: #000; } }
		.wpcf7-not-valid-tip { color: var(--link); font-size: .875rem; }
		.wpcf7-response-output { margin: 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 10px; }
		.wpcf7-spinner { display: none; }
	}
}
/* Drop-down under "Jeux" (tags) */
@layer layout {
	#nav {
		.sub-menu { display: grid; padding-inline-start: 1rem; }
		.menu-item-has-children > a::after { content: "▾"; margin-inline-start: .4rem; font-size: .75em; }
		@media (min-width: 60rem) {
			li { position: relative; }
			.sub-menu {
				display: none; position: absolute; inset-block-start: 100%; inset-inline-start: 0; z-index: 10; min-inline-size: 12rem; padding: .35rem;
				background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgb(0 0 0 / .6);
				a { border-radius: 8px; white-space: nowrap; }
			}
			li:hover > .sub-menu, li:focus-within > .sub-menu { display: grid; }
		}
	}
}
/* Game page: icon + key stats header, restyled demo, specs table */
@layer components {
	.game-head { display: grid; gap: 1.5rem; align-items: center; padding-block: 1.5rem 2rem; text-align: center; justify-items: center; }
	.game-icon { inline-size: min(60%, 13.75rem); aspect-ratio: 1; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); box-shadow: 0 0 0 4px rgb(217 0 0 / .25), 0 20px 50px rgb(217 0 0 / .18); }
	.game-intro { display: grid; justify-items: center; }
	.game-head .eyebrow a { color: inherit; text-decoration: none; &:hover { color: #fff; } }
	.game-head h1 { font-size: clamp(2rem, 1rem + 4.5vw, 3.75rem); margin-block-end: .75rem; }
	.game-head .chips { justify-content: center; margin-block-end: 1rem; }
	.key-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 0 0 1.5rem; }
	.key-stats > div { min-inline-size: 6.5rem; padding: .6rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
	.key-stats dt { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
	.key-stats dd { margin: 0; font-size: 1.35rem; font-weight: 700; color: #fff; }
	@media (min-width: 50rem) {
		.game-head { grid-template-columns: auto 1fr; text-align: start; justify-items: start; gap: 2.5rem; }
		.game-icon { inline-size: 13.75rem; }
		.game-intro { justify-items: start; }
		.game-head .chips, .key-stats { justify-content: flex-start; }
		.game-head .lead { margin-inline: 0; }
	}

	.game-body { display: grid; gap: 1.5rem; margin-block: 2rem; align-items: start; }
	@media (min-width: 52rem) { .game-body { grid-template-columns: 1.3fr 1fr; } }
	.about, .specs-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; margin: 0; }
	.about h2, .specs-box h2 { font-size: 1.2rem; }
	.specs-box .specs { display: grid; margin: 0; }
	.specs-box .specs > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .6rem; border-block-end: 1px solid var(--line); &:last-child { border: 0; } }
	.specs-box dt { color: var(--muted); font-size: .9rem; }
	.specs-box dd { margin: 0; text-align: end; font-weight: 600; a { color: #fff; } }
	.fold { border-block-start: 1px solid var(--line); padding-block: .75rem; summary { cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; } p { margin: .6rem 0 0; color: var(--muted); font-size: .95rem; } }

	/* Slotlan's own widget: neutralise its brand colour and its duplicate info block */
	.game .sl-slots, .game .sl-container, .game .sl-featured-widget-container { background: var(--panel) !important; }
	.game .slotls-header { background: var(--panel) !important; border: 0 !important; border-block-end: 1px solid var(--line) !important; border-radius: 10px 10px 0 0; }
	.game .sl-game-attributes { display: none; }
	.game .demo { padding: 0; overflow: hidden; }
}
/* Sort links above the games grid */
@layer components {
	.sortbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem 1.5rem; }
	.sortbar a { padding: .45rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none; &:hover { border-color: var(--red); } &[aria-current] { background: var(--red); border-color: var(--red); } }
}
/* Pagination under the games grid */
@layer components {
	.pagination { margin-block: 2rem 1rem; }
	.pagination .nav-links { flex-wrap: wrap; }
	.pagination .page-numbers { min-inline-size: 2.5rem; text-align: center; &:hover:not(.current, .dots) { border-color: var(--red); } &.dots { border-color: transparent; } }
	.count { text-align: center; color: var(--muted); font-size: .9rem; }
}
/* Independent of theme.json output (printed in the footer): base colours and font */
@layer base {
	html { background: var(--bg); }
	body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
}
/* Release date line on cards */
@layer components { .card .note-line { color: var(--muted); font-size: .8rem; } }
/* Comment form */
@layer components {
	.comment-form { display: grid; gap: 1rem; }
	.comment-form p { display: grid; gap: .4rem; margin: 0; }
	.comment-form label { font-weight: 600; }
	.comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
		inline-size: 100%; padding: .7rem .9rem; font: 1rem var(--font); color: #fff; background: #000; border: 1px solid var(--line); border-radius: 10px;
		&:focus-visible { border-color: var(--red); outline: 0; }
	}
	.comment-form textarea { min-block-size: 9rem; resize: vertical; }
	.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--muted); input { margin-block-start: .25rem; accent-color: var(--red); } label { font-weight: 400; } }
	.comment-form .comment-notes { color: var(--muted); font-size: .9rem; }
	.comment-form .form-submit { justify-items: start; }
	.comment-reply-title { font-size: 1.25rem; }
	.comment-reply-title small { margin-inline-start: .75rem; font-size: .85rem; }
	@media (min-width: 40rem) { .comment-form-author, .comment-form-email { display: grid; } }
}