/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/**
 * Skip link: independent focus-state contrast.
 *
 * `<a class="skip-link">` is emitted directly by Bricks core's own
 * includes/frontend.php (twice: "Skip to main content" and "Skip to
 * footer") -- it is never placed as a builder element, so it never carries
 * `_cssGlobalClasses`, and Bricks' global-class CSS generator only emits a
 * class's CSS for pages where some element actually references that class
 * (see Assets::generate_css_from_element()). The "skip-link" entry in the
 * Bricks global-classes list (imported from ACSS, category "acss") is
 * therefore permanently inert -- editing its settings there compiles to
 * nothing, on any page. This site's own stylesheet is the only place that
 * reliably reaches this markup, which is why the fix lives here instead.
 *
 * ACSS's own `.skip-link` rule (automatic.css) sets background/color from
 * --btn-background / --btn-text-color, which are undefined outside a
 * `.btn--*` modifier class the skip link never carries -- an invalid
 * `var()` reference that resolves to `initial`/inherited, which is what
 * produced the reported 1:1 contrast. This gives it an explicit,
 * independent background regardless of what --primary resolves to.
 */
.skip-link {
	background: #ffffff !important;
	color: var(--primary) !important;
	border: 2px solid var(--primary);
}

.skip-link:where(:focus-visible) {
	outline-color: var(--primary) !important;
}
/**
 * Uniquely Geek: project tokens ACSS 4.0.1 cannot hold.
 *
 * Values come from the approved Direction 6 Paper tokens (file
 * 01M4H8Y28BSDQSYH6WTRMSE98E, p-B-0). Palette, fonts and the heading/text
 * scale live in ACSS; only these have no ACSS setting.
 */
:root {
	--text-button: 0.8125rem;   /* Paper --text-button 13px: nav, tickets, buttons */
	--tracking-label: 0.16em;   /* Paper --tracking-label: uppercase labels */
	--tracking-display: -0.02em;/* Paper --tracking-display: display serif */
	--font-serif: "Libre Caslon Text", Georgia, serif; /* Paper --font-serif: italic leads, quotes, prices */
	--font-script: "Kalam", "Comic Sans MS", cursive; /* Paper --whimsy-font-script: handwritten notes */
	--space-xxs: 0.5rem;        /* Paper --space-xs 8px: below the ACSS scale */
	--space-xxxs: 0.25rem;      /* Paper --space-2xs 4px: below the ACSS scale */
}

/**
 * Uniquely Geek: markup created by assets/js/ug-home.js (not builder
 * elements, so it lives here). Mason, 2026-11-20.
 */

/* Scroll reveals: only elements below the fold at load get .ug-reveal. */
.ug-reveal {
	opacity: 0;
	translate: 0 1.25rem;
	transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ug-reveal.is-revealed { opacity: 1; translate: 0 0; }

/* Video lightbox (native <dialog>, modal). */
.ug-lightbox {
	inline-size: min(92vw, 70rem);
	max-inline-size: none;
	max-block-size: 92vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.ug-lightbox::backdrop { background-color: color-mix(in oklch, var(--base-ultra-dark) 88%, transparent); }
.ug-lightbox[open] { animation: ug-lightbox-in 0.25s ease; }
@keyframes ug-lightbox-in { from { opacity: 0; scale: 0.98; } to { opacity: 1; scale: 1; } }
.ug-lightbox__frame { position: relative; }
.ug-lightbox__video {
	display: block;
	inline-size: 100%;
	max-block-size: 85vh;
	aspect-ratio: 16 / 9;
	background-color: var(--black);
}
.ug-lightbox__close {
	position: absolute;
	inset-block-start: -3.25rem;
	inset-inline-end: 0;
	display: grid;
	place-items: center;
	inline-size: 44px;
	block-size: 44px;
	border: 1px solid var(--base-light);
	border-radius: 50%;
	background-color: transparent;
	color: var(--base-ultra-light);
	cursor: pointer;
}
.ug-lightbox__close::before {
	content: "";
	inline-size: 16px;
	block-size: 16px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M2 2l12 12M14 2L2 14'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M2 2l12 12M14 2L2 14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ug-lightbox__close:hover { background-color: var(--base-ultra-light); color: var(--base-ultra-dark); }
.ug-lightbox__close:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
html.ug-lightbox-open { overflow: hidden; }

/* Reduced motion: no reveals, no pulse, instant transitions everywhere. */
@media (prefers-reduced-motion: reduce) {
	.ug-reveal { opacity: 1; translate: none; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Inner pages (Mason, 2026-12-01) ---------- */
/* Open facts the client must confirm. Search the site for "To confirm:" before launch. */
.ph {
	color: var(--secondary);
	font-style: italic;
	text-decoration: underline dashed color-mix(in oklch, var(--secondary) 45%, transparent);
	text-underline-offset: 0.25em;
}
.ug-sr-only {
	position: absolute !important;
	inline-size: 1px; block-size: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.ug-list-reset { margin: 0; padding: 0; list-style: none; }

/* ---------- WooCommerce notices, sitewide (Mason, 2026-12-02) ----------
   Paper has no notice design, so this follows the dashboard's notice pattern on the brand palette:
   linen surface, hairline border, a 3px left accent (brass-deep for success and info, claret for errors),
   ink text in Hanken at body size, and the action as the site's text link ("View cart →").
   Covers classic notices (.woocommerce-message / -info / -error) and the cart/checkout block banners.
   The doubled :root lifts these over WooCommerce's own rules and the My Account (.dash.dash) rules.
   Contrast on linen: ink 15:1, brass-deep link and accent about 5:1, claret accent about 9:1. */
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
:root:root body .wc-block-components-notice-banner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 1.5rem;
	box-sizing: border-box;
	inline-size: 100%;
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem 0.75rem 1.25rem;
	border: 1px solid var(--neutral);
	border-inline-start: 3px solid var(--primary-semi-dark);
	border-radius: 0;
	background-color: var(--neutral-light);
	box-shadow: none;
	color: var(--base);
	font-family: var(--text-font-family);
	font-size: var(--text-m);
	font-weight: 400;
	line-height: 1.6471;
	list-style: none;
	text-align: start;
}
:root:root body .woocommerce-error,
:root:root body .wc-block-components-notice-banner.is-error { border-inline-start-color: var(--secondary); }
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before,
:root:root body .wc-block-components-notice-banner > svg { display: none; }
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::after { display: none; }
/* Error lists: one line per message */
:root:root body ul.woocommerce-error { flex-direction: column; align-items: stretch; }
:root:root body ul.woocommerce-error > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
:root:root body .wc-block-components-notice-banner__content { flex: 1 1 0%; min-inline-size: 0; color: var(--base); font-size: var(--text-m); }
:root:root body .wc-block-components-notice-banner__content :is(p, ul, li) { margin: 0; padding: 0; list-style: none; }
/* The action ("View cart", "Return to shop", "Restore item"): the site's text link, 44px tall target */
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) :is(a.button, a.wc-forward, a.restore-item, a.showlogin, a.showcoupon),
:root:root body .wc-block-components-notice-banner a {
	float: none;
	order: 2;
	display: inline-flex;
	align-items: center;
	min-block-size: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--primary-semi-dark);
	font-family: var(--text-font-family);
	font-size: var(--text-s);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.6;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.45em;
	text-transform: none;
	white-space: nowrap;
}
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) :is(a.button, a.wc-forward)::after,
:root:root body .wc-block-components-notice-banner a.wc-forward::after { content: " \2192"; white-space: pre; }
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a:hover,
:root:root body .wc-block-components-notice-banner a:hover { background: none; color: var(--base); }
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner) a:focus-visible { outline: 2px solid var(--base); outline-offset: 2px; }
/* Woo focuses a new notice (tabindex -1) for screen readers; show a ring only for keyboard focus */
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner):focus { outline: none; }
/* No ring on the notice box itself: it is tabindex -1 (never reached by Tab), and Chrome treats WooCommerce's
   focus() on page load as :focus-visible, which drew a dark second frame around the box. Links keep their ring. */
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner):focus-visible { outline: none; }
/* Block banner dismiss button */
:root:root body .wc-block-components-notice-banner__dismiss { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 2.75rem; min-block-size: 2.75rem; margin: -0.5rem -0.5rem -0.5rem 0; padding: 0; border: 0; background: none; color: var(--base); opacity: 1; }
:root:root body .wc-block-components-notice-banner__dismiss svg { inline-size: 1.25rem; block-size: 1.25rem; fill: currentColor; }
/* Configurator product pages (ug-configurator-skin): the plugin prints the wrapper straight into
   #main, full width. Give it the configurator's own side padding (48 to 80; 16 on phones) and its
   80rem content width, without a new media query: below 768 the min() term goes negative and max() picks 1rem. */
.ug-cfg-page .site-main > .woocommerce-notices-wrapper:has(> *) {
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: none;
	margin: 0;
	padding-block-start: 1.5rem;
	background-color: var(--neutral-ultra-light);
	padding-inline: max(1rem, min(clamp(3rem, calc(3rem + (100vw - 62rem) * 0.0721), 5rem), (100vw - 47.99rem) * 999));
}
/* Doubled :root so it outranks the base notice rule's margin and the box centers on the configurator's 80rem column */
:root:root .ug-cfg-page .site-main > .woocommerce-notices-wrapper > * { max-inline-size: 80rem; margin-inline: auto; }
.ug-cfg-page .site-main > .woocommerce-notices-wrapper > :last-child { margin-block-end: 0; }
/* Bricks pages print the wrapper as a .brxe-container (1100px default) at the top of #brx-content.
   Match the sections instead: the page gutter and the 80rem content width. */
#brx-content > .woocommerce-notices-wrapper:has(> *) {
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: none;
	margin: 0;
	padding: 1.5rem var(--gutter) 0;
}
:root:root body #brx-content > .woocommerce-notices-wrapper > * { max-inline-size: var(--content-width); margin-inline: auto; }
#brx-content > .woocommerce-notices-wrapper > :last-child { margin-block-end: 0; }
/* WooCommerce Blocks sets the banner action to #2f2f2f with !important at 70% opacity; only !important can lift it to the brand link color. */
:root:root body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward { float: none; margin-inline-start: 0.5rem; opacity: 1; color: var(--primary-semi-dark) !important; text-underline-position: auto; }
:root:root body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward:hover { color: var(--base) !important; text-decoration-line: underline; }
/* Classic notices mix text nodes with inline <strong> and <a>, so they flow as text (a flex row would split
   "Error: The username <strong>x</strong> is ..." into columns). The action floats to the line end. */
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) { display: block; }
:root:root body ul.woocommerce-error > li { display: block; }
:root:root body ul.woocommerce-error > li + li { margin-block-start: 0.5rem; }
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) :is(a.button, a.wc-forward, a.restore-item) { float: inline-end; margin: -0.5rem 0 -0.5rem 1.5rem; }
:root:root body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::after { content: ""; display: table; clear: both; }
/* Notice slots placed in Bricks with a Shortcode element running [shop_messages] (Account sign-in panel, Shop grid;
   plain class ug-notices). They take no room, and add no flex gap, until a notice is printed into them. */
.ug-notices:not(:has(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner)) { display: none; }
.ug-notices { inline-size: 100%; }
.ug-notices .woocommerce-notices-wrapper > :last-child { margin-block-end: 0; }

/* Blog featured images: where each photo is cropped (index, archive, post top, related). Dec 2, Mason.
   Only photos whose subject the centered crop cuts off are listed, by file name. */
:root #brx-content img:is([src*="Announcment_web"]) { object-fit: contain; background-color: #fff; }
:root #brx-content img[src*="tables-12-5-180579"] { object-position: 50% 80%; }
:root #brx-content img[src*="/IMG_3849"] { object-position: 50% 20%; }
:root #brx-content img[src*="DSC00224-copy"] { object-position: 50% 30%; }
:root #brx-content img[src*="Uniquely-Geek-Recap"] { object-position: 50% 30%; }
:root #brx-content img[src*="DSC3727_large"] { object-position: 50% 10%; }
:root #brx-content img[src*="UG_With_DINO"] { object-position: 50% 20%; }
:root #brx-content img[src*="Screen-Shot-2018-03-28"] { object-position: 50% 100%; }

/* Linked cards (blog, products, table lines). Dec 2, Mason.
   Image: a.ug-card-media, out of the tab order. Title: .ug-card-title > a, the one link keyboard and
   screen readers meet. The "Read more" style link stays clickable. At rest the cards look as before. */
:where(.ug-card-media) { display: block; color: inherit; text-decoration: none; }
:root #brx-content :is(.bl-card, .mini-card) > .ug-card-media { inline-size: 100%; }
:root #brx-content .bl-feat__badge { pointer-events: none; }
:root #brx-content .ug-card-title { text-decoration: none; }
:root #brx-content .ug-card-title::after { content: none; }
:root #brx-content .bl-row .ug-card-title { letter-spacing: normal; }
:root #brx-content .ug-card-title > a { color: inherit; font: inherit; letter-spacing: inherit; text-decoration: none; }
:root #brx-content .ug-card-title > a:hover,
:root #brx-content :is(.bl-feat, .bl-card, .bl-row, .item-card, .way-card, .line-row, .product-card, .hub-row, .prod-more__item, .mini-card):has(.ug-card-media:hover) .ug-card-title > a { color: var(--primary-semi-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:root #brx-content .ug-card-title > a:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 3px; }
