/*
Theme Name: VARZ
Theme URI: https://varz.dev/
Author: VARZ team, the ExS team
Author URI: https://varz.dev/
Description: A fast, minimal classic theme built on the VARZ classless CSS micro framework: every element is styled with CSS variables right in its style attribute, so there are no heavy stylesheets to override. Clean blog and page templates, a blank canvas template, footer widgets, custom logo and menus. Works great on its own and pairs with the VARZ Builder plugin for visual page building.
Version: 0.0.3
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: varz
Tags: blog, e-commerce, one-column, two-columns, left-sidebar, right-sidebar, grid-layout, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready

VARZ WordPress Theme, (C) 2026 VARZ team, the ExS team.
VARZ is distributed under the terms of the GNU GPL v3 or later.

Most styles live in the markup as VARZ CSS variables (see https://varz.dev/).
This file only covers what markup can't carry: WordPress generated classes and content typography.
*/

/* ---------- accessibility ---------- */
.site-main:focus {
	outline: none;
}

/* a promo bar the visitor closed (same message) - set before paint by a head script */
html.varz-promo-closed .varz-promo {
	display: none;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--vz-c-light);
	border-radius: 4px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
	clip: auto !important;
	clip-path: none;
	color: var(--vz-c-dark);
	display: block;
	font-size: 1rem;
	font-weight: 700;
	height: auto;
	left: 8px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* visible keyboard focus everywhere (links, menu items, buttons, form fields) */
:focus-visible {
	outline: 2px solid var(--vz-c-accent);
	outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline-offset: 0;
}

/* ---------- content ---------- */
/* :where() - zero specificity: these are defaults, VARZ inline variables ([style*="--c:"]) always win */
:where(.entry-content) > * + * {
	margin-top: 0;
}

:where(.entry-content, .comment-content, .archive-description, .widget) a {
	color: var(--vz-link);
}

:where(.entry-content) :where(img, video) {
	max-width: 100%;
	height: auto;
}

:where(.entry-content) blockquote {
	margin: 0 0 1em;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--vz-c-accent);
}

:where(.entry-content) table {
	width: 100%;
	margin-bottom: 1em;
}

:where(.entry-content) :where(pre, code) {
	background-color: var(--vz-c-light);
	border-radius: 4px;
}

:where(.entry-content) code {
	padding: 1px 4px;
}

:where(.entry-content) hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--vz-c-border);
}

/* ---------- WordPress generated classes ---------- */
.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* wide and full width: direct children of the content break out of its column; nested ones follow their
   container (a full width Query Loop's titles, a group's images). */
.entry-content > .alignwide {
	width: min(1100px, 100vw - 40px);
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.entry-content > .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

/* full width sections with text (groups, query loops ...) keep the site's side space - media stays edge to edge;
   patterns set their own padding (inline styles win). */
.entry-content > .alignfull:not(figure, .wp-block-image, .wp-block-cover, .wp-block-video, .wp-block-gallery, .wp-block-embed, .wp-block-separator, .wp-block-post-featured-image, .wp-block-media-text) {
	box-sizing: border-box;
	padding-inline: var(--vz-edge, 20px);
}

/* fields with a size attribute (login and search forms, dropdowns) never wider than their place. */
input,
select,
textarea {
	max-width: 100%;
}

/* tables: the calendar fills its width; other tables in posts and comments scroll inside themselves (Table blocks
   do already) instead of widening the page on phones. */
.wp-calendar-table {
	width: 100%;
	table-layout: fixed;
}

.entry-content > table,
.comment-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* long words and URLs never widen the page: titles break anywhere (also inside grid and flex cards), text only
   where a word does not fit. */
h1, h2, h3, h4, h5, h6, .entry-title, .page-title, .widget-title {
	overflow-wrap: anywhere;
}

.entry-content, .comment-content, .widget, .archive-description {
	overflow-wrap: break-word;
}

/* excerpts: often an embed's URL as plain text. */
.entry-summary {
	overflow-wrap: anywhere;
}

.nav-links > * {
	min-width: 0;
	overflow-wrap: anywhere;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1em;
}

.wp-caption-text,
.gallery-caption,
.wp-element-caption {
	font-size: .875em;
	color: var(--vz-c-muted);
	margin-top: .5em;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin-bottom: 1em;
}

.gallery-item {
	margin: 0;
}

.sticky .entry-title::before {
	content: "★ ";
	color: var(--vz-c-accent);
}

.bypostauthor > .comment-body .comment-author .fn::after {
	content: " ✓";
	color: var(--vz-c-accent);
}

/* ---------- comments ---------- */
.comment-list,
.comment-list .children {
	list-style: none;
	padding-left: 0;
}

.comment-list .children {
	padding-left: 24px;
	border-left: 1px solid var(--vz-c-border);
}

.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--vz-c-border);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 8px;
	font-size: .875em;
	color: var(--vz-c-muted);
}

.comment-author .avatar {
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 8px;
}

.comment-respond {
	margin-top: 32px;
}

.comment-form p {
	margin-bottom: 16px;
}

.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea {
	width: 100%;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

/* buttons WordPress outputs itself (comment form, search, password form): VARZ design tokens;
   a VARZ styled submit button (inline variables: contact form pattern) keeps its own styles */
:is(input[type="submit"], button[type="submit"], .wp-block-button__link):not([style*="--"]) {
	padding: var(--vz-btn-p, 10px 22px);
	border: var(--vz-btn-bw, 2px) solid var(--vz-btn-bc, var(--vz-c-accent2));
	border-radius: var(--vz-btn-br, 8px);
	background-color: var(--vz-btn-bgc, var(--vz-c-accent2));
	color: var(--vz-btn-c, var(--vz-c-white));
	font-weight: var(--vz-btn-fw, 600);
	line-height: var(--vz-btn-lh, 1.25);
	transition: var(--vz-transition, all .2s ease);
}

:is(input[type="submit"], button[type="submit"], .wp-block-button__link):not([style*="--"]):hover {
	background-color: var(--vz-btn-hov-bgc, var(--vz-c-accent));
	border-color: var(--vz-btn-hov-bc, var(--vz-c-accent));
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
	border-radius: var(--vz-input-br, 4px);
}

/* invalid after the visitor typed or tried to send (:user-invalid) - every form, also the ones WordPress renders;
   a field with its own VARZ --inv-bc keeps it. The message under comment fields: inc/front/forms.php */
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
	border-color: var(--vz-alert-error, #d93a2b);
}

input:user-invalid:focus-visible,
select:user-invalid:focus-visible,
textarea:user-invalid:focus-visible {
	outline-color: var(--vz-alert-error, #d93a2b);
}

/* <summary> styled with VARZ variables (FAQ patterns): no disclosure triangle in Safari either */
summary[style]::-webkit-details-marker {
	display: none;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: var(--vz-btn-bgc, var(--vz-c-accent2));
}

/* filled on hover: the button's text color, not the outline's */
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover {
	color: var(--vz-btn-c, var(--vz-c-white));
}

/* phones: buttons in a row become full-width, one per line - easy to tap, no ragged pairs */
@media (max-width: 575px) {
	/* full width buttons wrap to their own rows - also in Buttons blocks set not to wrap. */
	.wp-block-buttons,
	.wp-block-buttons.is-nowrap {
		flex-wrap: wrap;
		row-gap: .5em;
	}

	.wp-block-buttons > .wp-block-button,
	.wp-block-buttons > .wp-block-button[class*="wp-block-button__width"] {
		flex: 1 1 100%;
		width: 100%;
	}

	.wp-block-buttons > .wp-block-button > .wp-block-button__link {
		display: flex;
		justify-content: center;
		width: 100%;
	}
}

/* ---------- navigation ---------- */
/* a deeper dropdown that opens on the left (varz.js data-vz-fit): its item's arrow points left */
.sub-menu > li:has(> [data-vz-flipped*="x"]) > a > svg,
.sub-menu > li:has(> [data-vz-flipped*="x"]) > button > svg {
	transform: scaleX(-1);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
}

.page-links {
	clear: both;
	margin: 1em 0;
}

/* ---------- header & footer ---------- */
/*
 * WordPress admin bar (logged in): its height as variables for every "top" that depends on it -
 * --vz-admin-bar-h: the bar (32px, 46px up to 782px) - full screen layers start below it;
 * --vz-admin-bar-sticky: the same, 0 up to 600px where the bar scrolls away - sticky elements.
 * Anchors land below the sticky header (its height: --vz-header-h, varz.js data-vz-size).
 */
.admin-bar {
	--vz-admin-bar-h: 32px;
	--vz-admin-bar-sticky: 32px;
}

@media (max-width: 782px) {
	.admin-bar {
		--vz-admin-bar-h: 46px;
		--vz-admin-bar-sticky: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar {
		--vz-admin-bar-sticky: 0px;
	}
}

html:has(.site-header[data-vz-size]) {
	scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--vz-header-h, 0px) + 16px);
}

.main-navigation ul ul a {
	white-space: nowrap;
}

.site-footer nav ul,
.main-navigation ul {
	list-style: none;
}

/* the logo's size: the logo element (60px high unless its Image style sets a height) */
.custom-logo {
	display: block;
}

/* ---------- widgets ---------- */
.widget ul {
	list-style: none;
	padding-left: 0;
}

.widget li {
	padding: 4px 0;
}

/* ---------- print ---------- */
/* varz.css prints light colors, sticky / fixed bars once and link addresses; the theme leaves out what is
   no use on paper (menus, forms, sidebars, floating buttons) and lets the content take the place of the sidebars */
@media print {
	.site-header .varz-bar-el:not(.varz-bar-el-logo),
	.mobile-panel,
	.varz-layer,
	.varz-promo,
	.widget-area,
	.site-footer,
	.post-navigation,
	.related-posts,
	#respond,
	.comment-reply-link,
	.to-top,
	.varz-floating,
	.varz-bottom-bar,
	.screen-reader-text {
		display: none !important;
	}

	.site-content {
		display: block !important;
	}

	/* the site title is a link in a paragraph: no address after it */
	.site-branding a::after {
		content: none !important;
	}

	.entry-content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: .85em;
		word-break: break-all;
	}
}

/* back to top: with reduced motion (the framework stops all transitions) it still fades - no slide, no scale */
@media (prefers-reduced-motion: reduce) {
	.to-top {
		transform: none !important;
		transition-property: opacity, visibility !important;
		transition-duration: .3s !important;
	}
}

/* deeper dropdown levels open beside their item, across the panel's padding: a bridge keeps the hover on
   the way there (inc/front/menus.php - VARZ_MENU_SUBMENU_DEEP) */
.sub-menu > .menu-item-has-children::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 100%;
	width: 24px;
}

/* dropdowns of a left (start) column open to the right - lined up with the button's left edge (else they
   open to the left, off the screen); account, languages, the mini cart */
:is(.header-col-start, .footer-col-1) :is(.varz-dropdown > ul, .varz-cart-panel) {
	right: auto !important;
	left: 0 !important;
}

/* the mini cart opens on hover: not on touch screens or very narrow ones - there the cart icon simply leads
   to the cart page (a hover panel would need a tap first and has no room) */
@media (hover: none), (max-width: 575px) {
	.varz-cart-panel {
		display: none !important;
	}
}
