/*
Theme Name: Lovely Linen Blocksy Child
Theme URI: https://lovelylinen.pl/
Description: Child theme for Lovely Linen built on Blocksy.
Author: Lovely Linen
Template: blocksy
Version: 0.1.0
Text Domain: lovelylinen-blocksy-child
*/

[data-header*="type-1"] .ct-header [data-row*="top"] a,
[data-header*="type-1"] .ct-header [data-row*="top"] .entry-content,
[data-header*="type-1"] .ct-header [data-row*="top"] .ct-header-text {
	color: #fff;
	text-decoration: none;
}
[data-header*="type-1"] .ct-header [data-row*="top"] a:hover {
	color: rgba(255, 255, 255, 0.78);
}

[data-header*="type-1"] [data-id="account"][data-state="out"] {
	--theme-icon-size: 18px;
}

.lovelylinen-category-description {
	margin-top: 3em;
}

.lovelylinen-category-thumbnail {
	width: min(100%, 960px);
	margin: clamp(20px, 3vw, 32px) auto 0;
}

.lovelylinen-category-thumbnail__image {
	display: block;
	width: 100%;
	max-height: 420px;
	object-fit: contain;
	border-radius: 4px;
}

.lovelylinen-category-faq-section {
	margin-top: 3em;
}

.lovelylinen-category-faq-list {
	border-top: 1px solid var(--theme-border-color);
}

.lovelylinen-category-faq-item {
	border-bottom: 1px solid var(--theme-border-color);
}

.lovelylinen-category-faq-item summary {
	position: relative;
	padding: 1.1em 2.5em 1.1em 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.lovelylinen-category-faq-item summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.lovelylinen-category-faq-item summary::-webkit-details-marker {
	display: none;
}

.lovelylinen-category-faq-item summary::after {
	position: absolute;
	top: 50%;
	right: 0.35em;
	content: "+";
	font-size: 1.4em;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-50%);
}

.lovelylinen-category-faq-item[open] summary::after {
	content: "−";
}

.lovelylinen-category-faq-answer {
	padding: 0 2.5em 1em 0;
}

.lovelylinen-category-faq-answer > :last-child {
	margin-bottom: 0;
}

/* Keep product descriptions consistent with the site's global typography. */
:is(
	.woocommerce-product-details__short-description,
	.woocommerce-Tabs-panel--description,
	#tab-description
),
:is(
	.woocommerce-product-details__short-description,
	.woocommerce-Tabs-panel--description,
	#tab-description
) * {
	font-family: var(--theme-font-family) !important;
}

/* Tpay checkout: align the payment UI with the Lovely Linen storefront. */
.wc-block-components-radio-control-accordion-option:has(label[for*="tpay"]),
.wc-block-components-radio-control:has(label[for*="tpay"]) {
	border-color: transparent !important;
	border-radius: 3px !important;
	box-shadow: none !important;
}

.wc-block-components-radio-control-accordion-option--checked-option-highlighted:has(label[for*="tpay"]).wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border: 0 !important;
	background: rgba(112, 73, 54, 0.035);
	box-shadow:
		inset 0 0 0 1.5px #704936,
		0 3px 12px rgba(112, 73, 54, 0.08) !important;
}

label[for*="tpay"] .wc-block-components-radio-control__input:checked {
	border-color: #704936 !important;
}

label[for*="tpay"] .wc-block-components-radio-control__input:checked::before {
	background-color: #704936 !important;
}

label[for*="tpay"] .payment-label {
	align-items: center;
	gap: 16px;
	width: 100%;
	color: #292623;
	font-family: var(--theme-font-family);
	font-size: 15px;
	font-weight: 500;
}

label[for*="tpay"] .payment-label > img {
	width: 56px;
	height: 28px;
	margin-left: auto;
	max-width: 64px;
	max-height: 30px;
	object-fit: contain;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option > label {
	min-height: 60px;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control__label {
	font-size: 15px;
	font-weight: 500;
}

.wc-block-components-shipping-rates-control .wc-block-components-radio-control__label {
	font-size: 15px;
	font-weight: 500;
}

/* Shared, restrained interactions for shipping and payment choices. */
.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option {
	transition: background-color 160ms ease, box-shadow 160ms ease;
}

.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:not(.wc-block-components-radio-control__option-checked):hover,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:not(.wc-block-components-radio-control-accordion-option--checked-option-highlighted):hover {
	background-color: #fbfaf8 !important;
}

.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option.wc-block-components-radio-control__option-checked {
	background: rgba(112, 73, 54, 0.035);
	box-shadow:
		inset 0 0 0 1.5px #704936,
		0 3px 12px rgba(112, 73, 54, 0.08) !important;
}

.wc-block-components-shipping-rates-control .wc-block-components-radio-control__input,
.wc-block-checkout__payment-method .wc-block-components-radio-control__input {
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:hover .wc-block-components-radio-control__input,
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:hover .wc-block-components-radio-control__input {
	border-color: #9a7561 !important;
}

.wc-block-components-shipping-rates-control .wc-block-components-radio-control__input:checked,
.wc-block-checkout__payment-method .wc-block-components-radio-control__input:checked {
	box-shadow: 0 0 0 3px rgba(112, 73, 54, 0.09);
}

.wc-block-components-radio-control-accordion-content:has(.tpay-accept-conditions) {
	box-sizing: border-box;
	width: 100%;
	padding: 0 48px 18px;
}

.wc-block-components-radio-control-accordion-content .tpay-accept-conditions {
	max-width: 100%;
	font-size: 12px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.wc-block-components-radio-control-accordion-content .tpay-accept-conditions p {
	margin: 0 0 8px;
}

.wc-block-components-radio-control-accordion-content .tpay-accept-conditions p:last-child {
	margin-bottom: 0;
	color: #625d58;
}

.wc-block-components-radio-control-accordion-content .powered-by-tpay {
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	font-size: 12px;
	line-height: 1;
}

.wc-block-components-radio-control-accordion-content .powered-by-tpay p {
	margin: 0;
}

.wc-block-components-radio-control-accordion-content .powered-by-tpay img {
	width: auto;
	height: 18px !important;
}

#tpay-payment.tpay-pbl-container {
	max-width: none;
	padding: 0;
	background: transparent;
}

#tpay-payment .separator {
	margin-bottom: 18px;
	background-color: #e6e2de;
}

#tpay-payment .tpay-pbl {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	padding-bottom: 18px;
}

#tpay-payment .tpay-pbl .tpay-item {
	min-width: 0;
}

#tpay-payment .tpay-pbl .tpay-item > div {
	padding: 0;
}

#tpay-payment .tpay-pbl .tpay-item > div > div {
	display: flex;
	min-height: 104px;
	padding: 12px 8px;
	flex-direction: column;
	justify-content: center;
	border: 1px solid #e6e2de;
	border-radius: 3px;
	background: #fff;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#tpay-payment .tpay-pbl .tpay-item:hover > div > div {
	border-color: #8b8179;
	box-shadow: 0 4px 14px rgba(41, 38, 35, 0.08);
	transform: translateY(-1px);
}

#tpay-payment .tpay-pbl .tpay-item input:checked + div > div {
	border: 2px solid #704936;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(112, 73, 54, 0.1);
}

#tpay-payment .tpay-pbl .tpay-item input:focus-visible + div > div {
	border: 2px solid #704936;
	outline: 2px solid rgba(112, 73, 54, 0.24);
	outline-offset: 2px;
}

#tpay-payment .tpay-pbl .tpay-group-logo-holder {
	height: 54px;
}

#tpay-payment .tpay-pbl .tpay-group-logo-holder img {
	width: 84px;
	max-height: 46px;
	object-fit: contain;
}

#tpay-payment .tpay-pbl .name,
#tpay-payment .tpay-accept-conditions,
#tpay-payment .powered-by-tpay {
	color: #292623;
	font-family: var(--theme-font-family);
}

#tpay-payment .tpay-pbl .name {
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.3;
}

#tpay-payment .tpay-accept-conditions a {
	color: #292623;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

@media (max-width: 782px) {
	#tpay-payment .tpay-pbl {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 420px) {
	#tpay-payment .tpay-pbl {
		grid-template-columns: 1fr;
	}

	.wc-block-components-radio-control-accordion-content:has(.tpay-accept-conditions) {
		padding-right: 20px;
		padding-left: 20px;
	}
}

/* Cart recommendations: visually separate them from the order itself. */
.wp-block-woocommerce-cart-items-block > .wp-block-woocommerce-product-collection,
.woocommerce-cart .cross-sells {
	margin-top: clamp(40px, 6vw, 72px);
	padding-top: clamp(28px, 4vw, 48px);
	border-top: 1px solid var(--theme-border-color);
}

.wp-block-woocommerce-cart-items-block > .wp-block-woocommerce-product-collection > h2,
.woocommerce-cart .cross-sells > h2 {
	margin-bottom: 24px;
}
