/**
 * Arcezo: WordPress, WooCommerce and plugin specific additions.
 *
 * main.css is the 1:1 port of the static front. Rules here only cover markup that WordPress
 * or plugins produce, and reuse values from main.css.
 */

/*
 * WordPress prints width/height attributes on images. Keep the intrinsic ratio as in the static
 * front (its images had no attributes); rules in main.css that set a height still win.
 */
img {
	height: auto;
}

/* Accessibility: visually hidden text (replaces .hidden labels of the static front). The listing's
   result count is not shown in the static front; it stays for screen readers (read out after filtering). */
.screen-reader-text,
.wpcf7 .screen-reader-response,
.woocommerce-result-count {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	top: 12px;
	left: 20px;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 12px;
	clip: auto;
	clip-path: none;
	background: var(--white);
}

/* Admin bar: fixed panels start below it. */
.admin-bar .skip:focus {
	top: 44px;
}

.admin-bar .drawer,
.admin-bar .search-panel,
.admin-bar .lightbox {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .drawer,
	.admin-bar .search-panel,
	.admin-bar .lightbox {
		top: 46px;
	}
}

/* Header: site name shown until a logo is set in the Customizer. */
.logo-text {
	display: block;
	text-align: center;
	font-weight: 700;
	letter-spacing: 3px;
}

/* Page titles come from WordPress; the static front typed them in capitals. */
.content-page > h1,
.page-title,
.collection-head h1 {
	text-transform: uppercase;
}

/* Links in texts are underlined (the static front wrapped them in <u>). */
.content-page :where(p, li, td) a,
.details-content a {
	text-decoration: underline;
}

.details-content > :last-child {
	margin-bottom: 0;
}

/* Table block (.table-wrap/.size-table are added in inc/blocks.php): no figure margin, no heavy header rule. */
.table-wrap {
	margin: 0;
}

.table-wrap thead {
	border-bottom: 0;
}

/* Editor content: alignments and captions. */
.alignleft {
	float: left;
	margin: 0 24px 24px 0;
}

.alignright {
	float: right;
	margin: 0 0 24px 24px;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption,
.content-page figcaption {
	font-size: 12px;
	color: var(--muted);
}

/* Product card and product page: a sale price is not underlined. */
.card-price ins,
.product-price ins {
	text-decoration: none;
}

/* Listing controls: the selects may shrink below their longest option (translated labels are longer). */
.collection-controls select {
	min-width: 0;
}

/* Listing without results: same bottom spacing as the grid. */
.collection-empty {
	padding-bottom: 70px;
}

/* WooCommerce notices (not in the static front): styled like .info-banner. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	margin: 0 0 28px;
	padding: 14px 18px;
	border: 1px solid var(--gray-400);
	color: var(--gray-700);
	font-size: 12px;
	list-style: none;
}

.woocommerce-error li + li {
	margin-top: 6px;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	float: right;
	min-height: 0;
	margin-left: 12px;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--gray-700);
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: inherit;
}

/* Pagination (not in the static front): centred page links, the current one underlined like .text-button. */
.woocommerce-pagination {
	margin-top: -40px;
	padding: 0 30px 70px;
	text-align: center;
}

.woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
}

.woocommerce-pagination .page-numbers li > * {
	display: inline-block;
	min-width: 20px;
	padding: 4px 0;
}

.woocommerce-pagination .current {
	border-bottom: 1px solid var(--gray-700);
	font-weight: 700;
}

.woocommerce-pagination a:hover {
	text-decoration: underline;
}

@media (max-width: 740px) {
	.woocommerce-pagination {
		margin-top: -20px;
		padding: 0 10px 40px;
	}

	.collection-empty {
		padding-bottom: 40px;
	}
}

/* Contact Form 7 (plugin styles are disabled in inc/forms.php). */
.wpcf7 .hidden-fields-container {
	display: none;
}

.wpcf7-form-control-wrap {
	position: relative;
}

.wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	font-size: 12px;
}

.wpcf7 form .wpcf7-response-output {
	margin: 15px 0 0;
	font-size: 13px;
}

.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output {
	display: none;
}

/* Form fields: the CF7 wrapper sits between the label and the input in .field; it lays out its
   children like .field does (flex column), so inputs and textareas are blocks as in the static front. */
.field .wpcf7-form-control-wrap {
	display: flex;
	flex-direction: column;
}

/* Contact form button (inline style margin-top: 24px in the static front). */
.contact-layout .wpcf7-form > .button {
	margin-top: 24px;
}

/* Newsletter form in the footer: the field wrapper takes the input's place in the flex row. */
.newsletter .wpcf7-form-control-wrap {
	display: flex;
	flex: 1;
	min-width: 0;
}

.newsletter .wpcf7-not-valid-tip {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 4px;
	font-size: 11px;
}

/* The result is shown in the toast (assets/js/forms.js). */
.wpcf7 form.newsletter .wpcf7-response-output {
	display: none;
}

/* WooCommerce form fields (checkout, addresses): <p> rows without paragraph margins, spaced by the
   grid like the <div class="field"> of the static front; the input wrapper lays out like .field. */
p.field {
	margin: 0;
}

.field .woocommerce-input-wrapper {
	display: flex;
	flex-direction: column;
}

.field label .required {
	border: 0;
	text-decoration: none;
}

.field label .optional {
	color: var(--muted);
}

.woocommerce-invalid .input-text,
.woocommerce-invalid select {
	border-color: var(--black);
	box-shadow: inset 0 0 0 1px var(--black);
}

.checkout-inline-error-message {
	margin: 0;
	font-size: 12px;
}

/* Checkout: validation notices inserted into the form span both columns. */
.checkout-layout > .woocommerce-NoticeGroup {
	grid-column: 1 / -1;
}

/* Checkout: payment method details below the .choice item. */
.payment_box {
	margin-bottom: -1px;
	padding: 0 16px 16px 42px;
	border: 1px solid var(--gray-400);
	border-top: 0;
	color: var(--gray-700);
	font-size: 12px;
}

.payment_box > :last-child {
	margin-bottom: 0;
}

.choice img {
	width: auto;
	max-height: 24px;
}

.check a {
	text-decoration: underline;
}

.cart-summary .woocommerce-remove-coupon {
	margin-left: 6px;
	font-size: 12px;
	text-decoration: underline;
}

/* Account menu (not in the static front): small links, the current one underlined like .text-button. */
.account-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin: 0 0 36px;
	padding: 0;
	list-style: none;
	font-size: 12px;
	letter-spacing: 1px;
}

.account-nav a {
	display: inline-block;
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
}

.account-nav a[aria-current="page"],
.account-nav a:hover {
	border-bottom-color: var(--gray-700);
}

/* Account: orders table actions, order updates, addresses. */
.woocommerce-orders-table .text-button + .text-button {
	margin-left: 12px;
}

.order-notes {
	padding-left: 0;
	list-style: none;
}

.order-notes li {
	padding: 12px 0;
	border-bottom: 1px solid var(--gray-200);
}

.woocommerce-customer-details address,
.woocommerce-Address address {
	color: var(--gray-800);
	font-style: normal;
}

.woocommerce-customer-details .col2-set,
.woocommerce-Addresses {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

.woocommerce-Address-title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 20px;
}

.woocommerce-Address-title .edit {
	border-bottom: 1px solid var(--gray-700);
	font-size: 12px;
}

/* Account forms kept from WooCommerce (edit address, account details, checkout login and coupon). */
.woocommerce-address-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-bottom: 24px;
}

:is(.woocommerce-EditAccountForm, .checkout_coupon, .woocommerce-form-login) .form-row {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0 0 18px;
}

:is(.woocommerce-EditAccountForm, .checkout_coupon, .woocommerce-form-login) label {
	font-size: 12px;
}

:is(.woocommerce-EditAccountForm, .checkout_coupon, .woocommerce-form-login) .input-text {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: transparent;
}

.woocommerce-EditAccountForm fieldset {
	margin: 32px 0 0;
	padding: 0;
	border: 0;
}

.woocommerce-EditAccountForm legend {
	margin-bottom: 18px;
	padding: 0;
	font-size: 19px;
	font-weight: 700;
}

.woocommerce-EditAccountForm em {
	color: var(--muted);
	font-size: 12px;
	font-style: normal;
}

/* Password fields: no show/hide toggle (the static front has none); strength meter as small text. */
.show-password-input {
	display: none;
}

.woocommerce-password-strength,
.woocommerce-password-hint {
	display: block;
	margin-top: 6px;
	color: var(--gray-700);
	font-size: 12px;
}

.woocommerce-privacy-policy-text {
	margin-bottom: 18px;
	color: var(--muted);
	font-size: 12px;
}

.woocommerce-privacy-policy-text a {
	text-decoration: underline;
}

/* Thank-you page: payment instructions of a gateway (e.g. bank transfer details). */
.success > section {
	margin-top: 30px;
	text-align: left;
}

.success > section h2 {
	font-size: 17px;
}

.success > section ul {
	padding: 0;
	list-style: none;
	font-size: 12px;
}

@media (max-width: 740px) {
	.woocommerce-customer-details .col2-set,
	.woocommerce-Addresses {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.woocommerce-address-fields__field-wrapper {
		gap: 14px;
	}
}

/* Comments (not part of the static front): form fields spaced like .auth-wrap. */
.comment-form .field {
	margin-bottom: 18px;
}

.comment-list {
	padding-left: 0;
	list-style: none;
}
