/*
Theme Name: Biaa.ba.ma
Theme URI: https://biaabama.com
Author: Biaa.ba.ma
Description: Block theme for Biaa.ba.ma, Persian events in London. Dark, candlelit, phone first. Built around the Persian Halloween Party landing page and the Biaa.ba.ma Waiting List plugin.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: biaabama
*/

/* Colours, type and spacing live in theme.json. This file only holds what theme.json cannot express. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	overflow-wrap: break-word;
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
}

::selection { background: var(--wp--preset--color--burgundy); color: var(--wp--preset--color--ink); }

:where(a, button, summary, input, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 3px;
}

/* Theme logo (assets/logo/logo-white.png), shown when no Custom Logo is set. */
.bb-logo-fallback img { display: block; height: auto; max-width: 100%; }
.bb-logo-fallback a { display: inline-block; }

/* Header and footer (inner pages). */
.bb-header { padding-top: var(--wp--preset--spacing--40); padding-bottom: var(--wp--preset--spacing--40); border-bottom: 1px solid var(--wp--preset--color--line); }
.bb-footer { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.bb-footer p { margin: 0; }
.bb-footer p + p { margin-top: .5rem; }
.bb-footer-links a,
.bb-cookie-settings { color: var(--wp--preset--color--gold); }
.bb-footer-links a:hover,
.bb-cookie-settings:hover { color: var(--wp--preset--color--ink); }
.bb-cookie-settings {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Hero: candlelight from above, burgundy from below. No images. */
.bb-hero {
	position: relative;
	overflow: hidden;
	min-height: 92vh;
	min-height: 92svh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
	background:
		radial-gradient(ellipse 70% 45% at 50% 18%, rgba(212, 174, 102, .17), transparent 70%),
		radial-gradient(ellipse 90% 55% at 50% 110%, rgba(122, 31, 48, .6), transparent 70%),
		var(--wp--preset--color--base);
}
.wp-site-blocks .bb-hero.has-global-padding {
	padding-left: max(2rem, 6vw);
	padding-right: max(2rem, 6vw);
}
.bb-hero::before {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid rgba(212, 174, 102, .28);
	pointer-events: none;
}
.bb-hero::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 14%;
	width: 220px;
	height: 220px;
	margin-left: -110px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(212, 174, 102, .14), transparent 65%);
	pointer-events: none;
	animation: bb-flicker 5s ease-in-out infinite alternate;
}
@keyframes bb-flicker {
	0% { opacity: .65; transform: scale(1); }
	45% { opacity: 1; transform: scale(1.06); }
	60% { opacity: .8; transform: scale(.98); }
	100% { opacity: .95; transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) { .bb-hero::after { animation: none; } }
.bb-hero > * { position: relative; z-index: 1; width: 100%; }

.bb-hero .wp-block-site-logo { margin-left: auto; margin-right: auto; text-align: center; }
.bb-hero .wp-block-site-logo img { width: min(200px, 55vw); max-width: 100%; height: auto; margin: 0 auto; }

.bb-kicker {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}
.bb-title { font-size: var(--wp--preset--font-size--display); margin-top: .2em; margin-bottom: 0; text-wrap: balance; }
.bb-tagline {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--ink);
}
.bb-when { color: var(--wp--preset--color--muted); letter-spacing: .04em; }
.wp-block-separator.bb-ornament { color: var(--wp--preset--color--gold); border: 0; background: none; margin-top: .25rem; margin-bottom: .25rem; }
.wp-block-separator.bb-ornament.is-style-dots::before { content: "\2726\2003\2726\2003\2726"; letter-spacing: 0; padding-left: 0; font-size: .7rem; color: var(--wp--preset--color--gold); }
.bb-note { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }

/* Buttons: full width on phones, a comfortable tap target everywhere. */
.wp-block-button .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 599px) {
	.bb-hero .wp-block-buttons,
	.bb-closing .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.bb-hero .wp-block-button,
	.bb-closing .wp-block-button { width: 100%; }
	.bb-hero .wp-block-button__link,
	.bb-closing .wp-block-button__link { width: 100%; }
}

/* Sections. */
.bb-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.bb-section + .bb-section { border-top: 1px solid var(--wp--preset--color--line); }
.bb-section h2::after {
	content: "";
	display: block;
	width: 48px;
	height: 1px;
	margin-top: .55em;
	background: var(--wp--preset--color--gold);
}
.bb-closing h2::after,
.bb-join h2::after,
.bb-fa h2::after { margin-left: auto; margin-right: auto; }

/* Key details. */
.bb-details { list-style: none; padding-left: 0; margin-left: 0; }
.bb-details li { padding: .9rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.bb-details li:first-child { border-top: 1px solid var(--wp--preset--color--line); }
.bb-details strong {
	display: block;
	margin-bottom: .15rem;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

/* Early bird steps. */
.bb-steps { list-style: none; counter-reset: bb-step; padding-left: 0; margin-left: 0; }
.bb-steps li { counter-increment: bb-step; position: relative; padding-left: 3rem; margin-bottom: 1.1rem; }
.bb-steps li::before {
	content: counter(bb-step);
	position: absolute;
	left: 0;
	top: -.05em;
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 50%;
	color: var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--display);
	line-height: 1.9rem;
	text-align: center;
}

/* VIP and tables. */
.bb-vip {
	border: 1px solid rgba(212, 174, 102, .35);
	background: linear-gradient(160deg, rgba(122, 31, 48, .55), rgba(23, 19, 15, .9));
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

/* Waiting list band. */
.bb-join {
	background:
		radial-gradient(ellipse 80% 40% at 50% 0%, rgba(122, 31, 48, .45), transparent 75%),
		var(--wp--preset--color--surface);
}
.bb-section.bb-join,
.bb-join + .bb-section { border-top: 0; }

/* Farsi. */
.bb-fa {
	font-family: var(--wp--preset--font-family--persian);
	text-align: center;
	line-height: 1.9;
}
.bb-fa h2 { font-family: var(--wp--preset--font-family--persian); font-weight: 700; letter-spacing: 0; }
.bb-fa-tagline { color: var(--wp--preset--color--gold); font-size: var(--wp--preset--font-size--large); }
.bb-fa .bb-fa-cta { display: inline-block; margin-top: .5rem; padding: .8rem 1.4rem; border: 1px solid var(--wp--preset--color--gold); text-decoration: none; }
.bb-fa .bb-fa-cta:hover { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--base); }

/* FAQ. */
.bb-faq .wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 1rem 0; margin: 0; }
.bb-faq .wp-block-details:first-of-type { border-top: 1px solid var(--wp--preset--color--line); }
.bb-faq summary { cursor: pointer; font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--large); list-style: none; padding-right: 2rem; position: relative; }
.bb-faq summary::-webkit-details-marker { display: none; }
.bb-faq summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--wp--preset--color--gold); }
.bb-faq details[open] summary::after { content: "\2212"; }
.bb-faq .wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }

/* Closing. */
.bb-closing { text-align: center; }
.bb-links { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); line-height: 2.2; }
.bb-links a { white-space: nowrap; }

/* Waiting list plugin, matched to the theme. The plugin keeps its own look when used without this theme. */
.wp-site-blocks .bw-waitlist {
	--bw-bg: var(--wp--preset--color--base);
	--bw-ink: var(--wp--preset--color--ink);
	--bw-muted: var(--wp--preset--color--muted);
	--bw-gold: var(--wp--preset--color--gold);
	--bw-line: var(--wp--preset--color--line);
	--bw-rule: var(--wp--preset--color--rule);
	--bw-error: var(--wp--preset--color--ember);
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	margin: var(--wp--preset--spacing--40) auto 0;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	border-color: rgba(212, 174, 102, .3);
	font-family: var(--wp--preset--font-family--body);
	scroll-margin-top: 1.5rem;
}
.wp-site-blocks .bw-form label { font-size: .8rem; }
.wp-site-blocks .bw-form .bw-check { font-size: 1rem; line-height: 1.5; }
.wp-site-blocks .bw-form .bw-check input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.wp-site-blocks .bw-form button { min-height: 52px; font-family: var(--wp--preset--font-family--body); font-weight: 600; }
.wp-site-blocks .bw-pos { font-family: var(--wp--preset--font-family--display); }
@media (max-width: 480px) {
	.wp-site-blocks .bw-waitlist { margin-left: 0; margin-right: 0; padding: var(--wp--preset--spacing--40) 1rem; }
}

/* Cookie table on the privacy page: scrolls sideways inside itself on narrow phones. */
.wp-block-table.bb-cookie-table { overflow-x: auto; font-size: var(--wp--preset--font-size--small); }
.bb-cookie-table table { width: 100%; border-collapse: collapse; }
.bb-cookie-table th,
.bb-cookie-table td { padding: .55rem .6rem; border: 1px solid var(--wp--preset--color--line); text-align: left; vertical-align: top; }
.bb-cookie-table th { color: var(--wp--preset--color--gold); font-weight: 600; }
.bb-cookie-table td:first-child { overflow-wrap: anywhere; min-width: 6.5rem; }

/* Owner notes left in page content (privacy draft). */
.bb-draft { border-left: 3px solid var(--wp--preset--color--ember); padding: .75rem 1rem; background: var(--wp--preset--color--surface); }

/* Cookie banner (Google Analytics consent). Bottom card, never blocks the page.
   Both choices share one style so neither is pushed. */
.bb-consent[hidden] { display: none; }
.bb-consent {
	position: fixed;
	z-index: 100000;
	left: 16px;
	right: 16px;
	bottom: max(16px, env(safe-area-inset-bottom));
	max-width: 640px;
	/* Never taller than the screen (WCAG 1.4.10, for example 400% zoom or a landscape phone):
	   the card scrolls inside itself instead of its top being cut off. */
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 16px - max(16px, env(safe-area-inset-bottom)));
	overflow-y: auto;
	overscroll-behavior: contain;
	margin: 0 auto;
	box-sizing: border-box;
	padding: 1.1rem 1.1rem 1.15rem;
	border: 1px solid rgba(212, 174, 102, .45);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
	font-family: var(--wp--preset--font-family--body);
	font-size: .9375rem;
	line-height: 1.55;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
.bb-consent.is-open { opacity: 1; transform: none; }
.bb-consent:focus { outline: none; }
.bb-consent:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	.bb-consent { transition: none; transform: none; }
}
.bb-consent p { margin: 0 0 .75rem; }
.bb-consent__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
	color: var(--wp--preset--color--gold);
}
.bb-consent__text a { color: var(--wp--preset--color--gold); }
.bb-consent__text a:hover { color: var(--wp--preset--color--ink); }
.bb-consent__status { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.bb-consent__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.bb-consent__btn {
	flex: 1 1 9rem;
	min-height: 48px;
	padding: .7rem 1rem;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: .06em;
	cursor: pointer;
}
.bb-consent__btn:hover,
.bb-consent__btn:focus-visible { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--base); }
/* Short screens (landscape phones, high zoom): a more compact card. */
@media (max-height: 480px) {
	.bb-consent { padding: .8rem; font-size: .875rem; }
	.bb-consent__title { font-size: 1.125rem; }
	.bb-consent p { margin-bottom: .5rem; }
	.bb-consent__actions { margin-top: .6rem; }
}
