/*
Theme Name: WP SuperFaktúra
Theme URI: https://superfaktura.2day.sk/
Author: 2day.sk
Author URI: https://www.2day.sk/
Description: Bloková téma webu pluginu SuperFaktúra pre WooCommerce. Hodnoty farieb, písma a odstupov sú z site/tokens.css.
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.5.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wpsuperfaktura
*/

/* Only what theme.json cannot express. Colors and sizes come from its presets. */

.wpsf-kicker {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--amber-deep);
	margin: 0;
}
.is-style-section-navy .wpsf-kicker,
.is-style-section-deep .wpsf-kicker {
	color: var(--wp--preset--color--pale);
}

/* Claim under the header. */
.wpsf-claim {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* Wordmark: the SuperFaktúra symbol, then both names with the same weight. */
.wpsf-wordmark {
	margin: 0;
	line-height: 1;
}
.wpsf-wordmark a {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	text-decoration: none;
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.3rem;
	white-space: nowrap;
}
.wpsf-wordmark img {
	width: 36px;
	height: 36px;
	margin-right: 0.3rem;
	box-shadow: none !important;
	border-radius: 0 !important;
}
.wpsf-wordmark-name {
	font-weight: 800;
	letter-spacing: -0.01em;
}
.wpsf-wordmark-pre {
	font-weight: 500;
	color: var(--wp--preset--color--muted);
}
@media (max-width: 599px) {
	.wpsf-wordmark a {
		font-size: 1.1rem;
	}
	.wpsf-wordmark img {
		width: 30px;
		height: 30px;
		margin-right: 0.2rem;
	}
}
@media (max-width: 370px) {
	.wpsf-wordmark a {
		font-size: 0.98rem;
	}
	.wpsf-wordmark img {
		width: 26px;
		height: 26px;
	}
}

/* Mobile menu: the header button moves into the opened menu, the header keeps the wordmark and the menu button on one row. */
.wpsf-nav-cta {
	display: none !important;
}
@media (max-width: 599px) {
	.wpsf-header .wp-block-buttons:has(.wpsf-header-cta) {
		display: none !important;
	}
	.wpsf-header .wp-block-group.is-layout-flex {
		flex-wrap: nowrap;
		align-items: center;
	}
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--navy);
	padding: 0.35rem;
	margin: -0.35rem;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	width: 30px;
	height: 30px;
}
.wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.25rem 1rem 2rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3rem;
	align-items: flex-start;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0;
	width: 100%;
	align-items: stretch;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 0.9rem 0.25rem;
	font-size: 1.2rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wpsf-nav-cta {
	display: block !important;
	border-bottom: 0;
	margin-top: 1.5rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wpsf-nav-cta .wp-block-navigation-item__content {
	display: inline-block;
	width: auto;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--white);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* Words such as e-shop or e-mail stay on one line (see functions.php). */
.wpsf-nowrap {
	white-space: nowrap;
}

/* Facts under the hero buttons. */
.wpsf-facts strong {
	color: var(--wp--preset--color--white);
}

/* Secondary text action next to a button. */
.wpsf-textlink a {
	font-weight: 600;
}

/* Numbered steps of the setup wizard. */
ol.wpsf-steps {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: wpsf-step;
}
ol.wpsf-steps > li {
	counter-increment: wpsf-step;
	position: relative;
	padding: 0.7rem 0 0.7rem 2.6rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
ol.wpsf-steps > li:last-child {
	border-bottom: 0;
}
ol.wpsf-steps > li::before {
	content: counter(wpsf-step);
	position: absolute;
	left: 0;
	top: 0.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 999px;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: 0.8rem;
}
ol.wpsf-steps strong {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
}

/* Assurances: a navy rule above each. */
.wpsf-assure > .wp-block-column {
	border-top: 2px solid var(--wp--preset--color--navy);
	padding-top: 0.75rem;
}

/* Cards with a picture flush at the top (blog, latest posts). */
.wpsf-postcard {
	overflow: hidden;
	height: 100%;
}
.wpsf-postcard .wp-block-post-featured-image {
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.wpsf-postcard .wp-block-post-featured-image img {
	aspect-ratio: 14 / 9;
	object-fit: cover;
	width: 100%;
}

/* FAQ. The marker hangs left of the question, so a second line starts under the text, not under the marker. */
.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.0625rem;
}
details > summary {
	list-style: none;
	position: relative;
	padding-inline-start: 1.4rem;
	line-height: 1.35;
}
details > summary::-webkit-details-marker {
	display: none;
}
details > summary::before {
	content: "";
	position: absolute;
	left: 0.15rem;
	top: 0.4em;
	border-style: solid;
	border-width: 0.3em 0 0.3em 0.45em;
	border-color: transparent transparent transparent currentColor;
	transition: transform 0.15s;
}
details[open] > summary::before {
	transform: rotate(90deg);
}
.wp-block-details summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--amber);
	outline-offset: 2px;
	border-radius: 4px;
}
.wp-block-details > :not(summary) {
	margin-top: 0.75rem;
	margin-inline-start: 1.4rem;
}

/* Outline button on a navy band. */
.is-style-section-navy .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--white);
	border-color: rgba(255, 255, 255, 0.7);
}

/* Help box on the closing band. */
.wpsf-help {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 10px;
}

/* Inline code in text. */
:where(p, li, td) code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.875em;
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--navy-deep);
	border-radius: 4px;
	padding: 0.05em 0.25em;
	overflow-wrap: anywhere;
}
.is-style-section-pale :where(p, li, td) code {
	background: var(--wp--preset--color--white);
}

/* Tables scroll inside their own box on narrow screens. */
.wp-block-table {
	overflow-x: auto;
}
.wp-block-table td,
.wp-block-table th {
	border-color: var(--wp--preset--color--line);
	vertical-align: top;
}

/* Screenshots inside cards and the hero do not need the content shadow twice. */
.wpsf-flat img {
	box-shadow: none;
}

/* Header and footer. */
.wpsf-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.wpsf-claimbar {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.wpsf-claim {
	margin: 0;
}
.wpsf-footer-title {
	font-size: var(--wp--preset--font-size--caption);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}
.wpsf-footer-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}
.wpsf-footer-list a,
.wpsf-footer a {
	text-decoration: none;
}
.wpsf-footer a:hover {
	text-decoration: underline;
}
.wpsf-footer-brand {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.0625rem;
	color: var(--wp--preset--color--white);
}
.wpsf-footer-rule {
	border-color: rgba(255, 255, 255, 0.16) !important;
	margin-block: var(--wp--preset--spacing--30) 0.75rem;
}

/* Feature icons are line drawings, not screenshots. */
.wpsf-icon,
.wpsf-icon img {
	box-shadow: none !important;
	border-radius: 0 !important;
	margin: 0;
}

/* Category pill on cards and posts. */
.wpsf-tag a {
	display: inline-block;
	background: var(--wp--preset--color--amber-wash);
	color: var(--wp--preset--color--amber-deep);
	border-radius: 4px;
	padding: 0.1rem 0.5rem;
	text-decoration: none;
}
.wpsf-postcard .wp-block-post-title {
	line-height: 1.25;
}
.wpsf-postcard .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* FAQ list: the top rule is as wide as the questions. */
.wpsf-faq > .wp-block-details:first-child {
	border-top: 1px solid var(--wp--preset--color--line);
}

/* Header, main and footer touch; each band sets its own padding. */
body .wp-site-blocks > * {
	margin-block-start: 0;
}

/* Code examples keep their lines and indentation; long lines scroll inside the block. */
.wp-site-blocks .wp-block-code {
	overflow-x: auto;
	tab-size: 4;
}
.wp-site-blocks .wp-block-code code {
	white-space: pre;
	overflow-wrap: normal;
	word-break: normal;
}

/* Checklist on the features page. */
.wpsf-checklist {
	list-style: none;
	padding-left: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
	gap: 0.75rem 2rem;
}
.wpsf-checklist li {
	position: relative;
	padding-left: 1.75rem;
}
.wpsf-checklist li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.45em;
	width: 0.95rem;
	height: 0.5rem;
	border-left: 2.5px solid var(--wp--preset--color--amber-deep);
	border-bottom: 2.5px solid var(--wp--preset--color--amber-deep);
	transform: rotate(-45deg);
}

/* Wide card on the features page: the screenshot sits inside the card it illustrates. */
.wpsf-card-wide .wp-block-image {
	margin: 0;
}

/* Small heading right above its text: the kicker over a section heading, the assurance titles. */
.wpsf-kicker + .wp-block-heading {
	margin-block-start: 0.5rem;
}
.wpsf-assure .wp-block-heading + p {
	margin-block-start: 0.4rem;
}

/* Text of pages and posts: a heading opens a section, so it has more space above than below. */
.wp-block-post-content > h2 {
	margin-block-start: var(--wp--preset--spacing--40);
}
.wp-block-post-content > :is(h3, h4) {
	margin-block-start: var(--wp--preset--spacing--30);
}
.wp-block-post-content > :is(h2, h3, h4) + * {
	margin-block-start: 0.75rem;
}
.wp-block-post-content > :first-child {
	margin-block-start: 0;
}
/* The screenshot shadow reaches below the picture. */
.wp-block-post-content > .wp-block-image {
	margin-block-end: var(--wp--preset--spacing--30);
}
.wp-block-post-content .wp-block-list {
	padding-inline-start: 1.25em;
}
.wp-block-post-content .wp-block-list > li + li {
	margin-block-start: 0.35em;
}

/* Line breaks: even lines in headings, no lonely word at the end of a paragraph. */
:where(h1, h2, h3, summary) {
	text-wrap: balance;
}
:where(p, li, figcaption) {
	text-wrap: pretty;
}

/* The underline stays clear of the descenders. */
a:where(:not(.wp-element-button)) {
	text-underline-offset: 0.15em;
}

/* Focus on navy bands (fallback for the theme.json variation styles). */
:is(.is-style-section-navy, .is-style-section-deep) :is(a, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--white);
}
