/**
 * LSC Laser Child — layout overrides that must survive parent theme updates.
 */

/* Product summary CTA: quantity / add-to-cart + inquiry / leasing */
.template-product-summary__actions {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--small);
	width: 100%;
}

.template-product-summary__quantity-row {
	align-self: flex-start;
	justify-content: flex-start !important;
	width: auto;
}

.template-product-summary__quantity-row .wc-block-components-quantity-selector {
	margin: 0;
	max-width: none;
	width: auto;
}

.template-product-summary__cta-row {
	align-items: stretch;
	display: grid;
	gap: var(--wp--preset--spacing--xx-small);
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	width: 100%;
}

.template-product-summary__cta-row > .wp-block-woocommerce-product-button,
.template-product-summary__cta-row > .product-inquiry {
	align-self: stretch;
	display: flex;
	margin: 0;
	width: 100%;
}

.template-product-summary__cta-row .wc-block-components-product-button,
.template-product-summary__cta-row .wc-block-components-product-button .wp-block-button {
	display: flex;
	flex: 1;
	width: 100%;
}

.template-product-summary__cta-row .wc-block-components-product-button .wp-block-button__link,
.template-product-summary__cta-row .product-inquiry .product-inquiry__buttons,
.template-product-summary__cta-row .product-inquiry .wp-block-button,
.template-product-summary__cta-row .product-inquiry .product-inquiry__trigger {
	align-items: center;
	display: inline-flex;
	height: 100%;
	justify-content: center;
	min-height: 3.25rem;
	width: 100%;
}

.template-product-summary__cta-row .wp-block-woocommerce-product-button {
	text-align: center;
	width: 100%;
}

.template-product-summary__cta-row .wc-block-components-product-button .wp-block-button__link,
.template-product-summary__cta-row .wc-block-components-product-button .wc-block-components-product-button__button {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	text-align: center;
	width: 100%;
}

.template-product-summary__cta-row .wc-block-components-product-button .wp-block-button__link span,
.template-product-summary__cta-row .wc-block-components-product-button .wc-block-components-product-button__button span {
	align-items: center;
	display: inline-flex;
	gap: 0.75rem;
	justify-content: center;
	width: auto;
}

.template-product-summary__leasing-row {
	max-width: 28rem;
	width: 100%;
}

.template-product-summary__leasing-row .wp-block-buttons {
	margin: 0 !important;
	width: 100%;
}

@media (max-width: 37.5rem) {
	.template-product-summary__cta-row {
		grid-template-columns: 1fr;
	}
}

/* Sticky fixed buttons — inquiry visible only when JS adds .is-visible */
.wp-block-template-part:has(> .fixed-buttons) {
	margin-block-start: 0 !important;
}

.fixed-buttons {
	display: none;
	margin-block-start: var(--wp--preset--spacing--large);
	position: fixed !important;
	right: 0;
	z-index: 1000;
}

@media (max-width: 74.97rem) {
	.fixed-buttons {
		bottom: 1rem;
		display: flex;
		right: 1rem;
		top: auto;
	}
}

.fixed-buttons .wp-block-button.is-style-icon-only .wp-element-button {
	clip-path: polygon(0.9375rem 0, 100% 0, 100% calc(100% - 0.9375rem), calc(100% - 0.9375rem) 100%, 0 100%, 0 0.9375rem);
	height: clamp(3.125rem, 4.8476454294vw, 4.375rem);
	min-width: clamp(3.125rem, 4.8476454294vw, 4.375rem);
	width: clamp(3.125rem, 4.8476454294vw, 4.375rem);
}

@media (max-width: 74.97rem) {
	.fixed-buttons .wp-block-button.is-style-icon-only .wp-element-button {
		clip-path: polygon(0.4375rem 0, 100% 0, 100% calc(100% - 0.4375rem), calc(100% - 0.4375rem) 100%, 0 100%, 0 0.4375rem);
	}
}

.fixed-buttons__inquiry:not(.is-visible) {
	display: none;
}

/* CTA without image column — full width content (DE) */
@media (min-width: 48.875rem) {
	.cta-image .wp-block-columns:not(:has(.cta-image__image)) .cta-image__content,
	.cta-image.cta-image--no-image .cta-image__content {
		flex-basis: 100% !important;
		max-width: 100%;
		padding-right: clamp(2.5rem, 13.0193905817vw, 11.75rem);
	}
}

@media (max-width: 48.845rem) {
	.cta-image .wp-block-columns:not(:has(.cta-image__image)) .cta-image__content,
	.cta-image.cta-image--no-image .cta-image__content {
		text-align: center;
	}
}

/*
 * Post sidebar proportions from parent assets/css/parts/sidebar-post/style.css.
 * Needed because single.html embeds the sidebar pattern directly (not template-part),
 * so the parent no longer auto-enqueues that part stylesheet.
 */
.site-sidebar img {
	width: 100%;
}

@media (min-width: 48.875rem) {
	.wp-block-column:has(> .site-sidebar) {
		flex-basis: clamp(15.625rem, 0.376146789 * (100vw - 48.875rem) + 15.625rem, 20.75rem) !important;
		flex-grow: 0 !important;
	}

	.wp-block-column:has(> .site-sidebar) .site-sidebar {
		height: 100%;
	}
}
