/* Swanz base styles. Tokens (sizes, gutters) come from tokens.css, generated from the Shopline settings. */

*,
*::before,
*::after {
	box-sizing: border-box;
}

img,
video {
	max-width: 100%;
	height: auto;
}

/* Scripts show and hide things with the hidden attribute; keep it winning over display rules. */
[hidden] {
	display: none !important;
}

/* Arise's .container: full width with gutters, capped at page width + both gutters from 960px. */
.swanz-container {
	width: 100%;
	margin-inline: auto;
	padding-inline: var(--swanz-gutter);
}

@media (min-width: 960px) {
	.swanz-container {
		max-width: calc(var(--swanz-page-width) + 2 * var(--swanz-gutter));
	}
}

a {
	text-underline-offset: 6px;
}

/* Arise's .section-gap: 40px above and below each section, 60px from 750px (section_vertical_gap is 0).
   ":root body" lifts it above WordPress's flow-layout resets, which load later:
   :root :where(.is-layout-flow) > * and > :first-child / :last-child (up to 0,2,0). */
:root body .swanz-section-gap {
	margin-block: 40px;
}

@media (min-width: 750px) {
	:root body .swanz-section-gap {
		margin-block: 60px;
	}
}

/* Buttons (Arise .btn): primary = colour_btn_background, secondary = white with rust text. */
.swanz-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--swanz-button-padding);
	font-size: var(--swanz-button-font-size);
	line-height: var(--swanz-button-line-height);
	border: 1px solid transparent;
	border-radius: 0;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.swanz-button--primary {
	background: var(--wp--preset--color--button);
	border-color: var(--wp--preset--color--button);
	color: var(--wp--preset--color--button-text);
}

.swanz-button--secondary {
	background: var(--wp--preset--color--button-secondary);
	border-color: var(--wp--preset--color--button-secondary-border);
	color: var(--wp--preset--color--button-secondary-text);
}

.swanz-button:hover {
	opacity: 0.85;
}

/* On images (slides, banners) a secondary button is a white outline. */
.swanz-slide .swanz-button--secondary {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

/* Colour schemes 1-3 from the theme settings. */
.swanz-scheme-1 { background: var(--wp--preset--color--scheme-1-background); color: var(--wp--preset--color--scheme-1-text); }
.swanz-scheme-2 { background: var(--wp--preset--color--scheme-2-background); color: var(--wp--preset--color--scheme-2-text); }
.swanz-scheme-3 { background: var(--wp--preset--color--scheme-3-background); color: var(--wp--preset--color--scheme-3-text); }

/* 404 page (Arise stage__notFound): centred title3, a sentence, an underlined link. */
.swanz-not-found {
	margin: 155px 0;
	padding-inline: var(--swanz-gutter);
	text-align: center;
}

:root body .swanz-not-found__title {
	margin: 0;
	font-size: var(--swanz-title-3);
}

:root body .swanz-not-found__text {
	margin: 10px 0;
	font-size: var(--swanz-body-3);
}

:root body .swanz-not-found__link {
	margin: 0;
	font-size: var(--swanz-body-4);
}

.swanz-not-found__link a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 6px;
}

@media (max-width: 749.98px) {
	.swanz-not-found {
		margin: 80px 0 120px;
	}
}

/* Policy pages and Warranty (templates/page-policy.html; Arise policy template): page-width container,
   40px above and 100px below, centred title3 title, body3 text. ":root body" beats WordPress's
   flow-layout margin resets (blockGap is 0). */
.swanz-policy {
	width: 100%;
	margin-inline: auto;
	padding: 40px var(--swanz-gutter) 100px;
}

@media (min-width: 960px) {
	.swanz-policy {
		max-width: calc(var(--swanz-page-width) + 2 * var(--swanz-gutter));
	}
}

:root body .swanz-policy__title {
	margin: 0 0 20px;
	font-size: var(--swanz-title-3);
	line-height: 1.2;
	text-align: center;
}

.swanz-policy__body {
	font-size: var(--swanz-body-3);
	overflow-wrap: break-word;
}

:root body .swanz-policy__body > * {
	margin-block: 0 1em;
}

:root body .swanz-policy__body > :is(h2, h3, h4) {
	margin-block: 1.6em 0.6em;
	line-height: 1.3;
}

.swanz-policy__body > h2 {
	font-size: var(--swanz-title-5);
}

.swanz-policy__body > :is(h3, h4) {
	font-size: var(--swanz-title-6);
}

.swanz-policy__body :is(ul, ol) {
	padding-inline-start: 1.4em;
}

.swanz-policy__body li + li {
	margin-top: 0.4em;
}

.swanz-policy__body a {
	color: inherit;
	text-decoration: underline;
}

.swanz-policy__body hr {
	margin-block: 2em;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.swanz-policy__body .wp-block-table {
	overflow-x: auto;
}

.swanz-policy__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--swanz-body-4);
}

.swanz-policy__body :is(th, td) {
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--line);
	text-align: start;
	vertical-align: top;
}

.swanz-policy__body th {
	font-weight: 700;
}

/* A form inside a policy page (Warranty): the usual section gap above it (the margin reset above would
   remove it), and no second set of gutters. */
:root body .swanz-policy__body > .swanz-section-gap {
	margin-block: 40px 0;
}

@media (min-width: 750px) {
	:root body .swanz-policy__body > .swanz-section-gap {
		margin-block: 60px 0;
	}
}

.swanz-policy__body .swanz-contact .swanz-container {
	padding-inline: 0;
}

/* Details still to be confirmed (config/store.json), highlighted so they're not missed before launch. */
.swanz-pending {
	padding: 0 4px;
	background: #fff3bf;
	color: inherit;
}
