/**
 * Mobile Blocksy Floating Cart refinements.
 *
 * Visibility remains controlled by Blocksy. These rules only arrange its
 * existing title, price and action so the full product context stays visible.
 */

.ct-floating-bar .sm-floating-variation {
	display: none;
}

@media (max-width: 689.98px) {
	:root {
		--sm-mobile-floating-cart-height: 108px;
	}

	.ct-drawer-canvas[data-floating-bar] {
		--floating-bar-height: calc(var(--sm-mobile-floating-cart-height) + env(safe-area-inset-bottom, 0px));
	}

	.ct-floating-bar {
		box-sizing: border-box;
		height: calc(var(--sm-mobile-floating-cart-height) + env(safe-area-inset-bottom, 0px));
		padding-bottom: env(safe-area-inset-bottom, 0px);
		border-top: 0;
		box-shadow: 0 -8px 28px rgba(7, 31, 52, 0.09);
	}

	.ct-floating-bar .ct-container {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto 44px;
		grid-template-areas:
			"title title"
			"price actions";
		column-gap: 12px;
		row-gap: 7px;
		padding-block: 8px;
	}

	.ct-floating-bar .ct-floating-bar-content,
	.ct-floating-bar .ct-floating-bar-item-title {
		display: contents;
	}

	.ct-floating-bar .product-title {
		grid-area: title;
		align-self: end;
		overflow: visible;
		color: var(--sm-color-navy);
		font-family: var(--sm-font-heading, "Barlow Condensed", sans-serif);
		font-size: 15px;
		font-weight: 700;
		letter-spacing: 0.02em;
		line-height: 1.15;
		text-overflow: clip;
		white-space: normal;
	}

	.ct-floating-bar .sm-floating-variation {
		display: block;
		margin-top: 2px;
		color: var(--sm-color-muted);
		font-family: var(--sm-font-body, "Source Sans 3", sans-serif);
		font-size: 11px;
		font-weight: 600;
		letter-spacing: 0;
		line-height: 1.25;
	}

	.ct-floating-bar .product-price {
		grid-area: price;
		align-self: center;
		min-width: 0;
	}

	.ct-floating-bar .product-price .price {
		display: grid;
		gap: 1px;
		line-height: 1.2;
	}

	.ct-floating-bar .product-price .amount {
		color: var(--sm-color-blue);
		font-size: 16px;
		font-weight: 700;
		white-space: nowrap;
	}

	.ct-floating-bar .product-price .woocommerce-price-suffix {
		color: var(--sm-color-muted);
		font-size: 10px;
		font-weight: 400;
		line-height: 1.2;
		white-space: nowrap;
	}

	.ct-floating-bar .ct-floating-bar-actions {
		grid-area: actions;
		align-self: center;
	}

	.ct-floating-bar .ct-floating-bar-actions :is(.added_to_cart, .add_to_cart_button, .single_add_to_cart_button, .product_type_variable.button) {
		min-width: 0;
		max-width: none;
		min-height: 44px;
		padding-inline: 16px;
		font-size: 14px !important;
		white-space: nowrap;
	}

	/*
	 * Real Cookie Banner can only set this offset globally. Move its sticky
	 * legal-links widget only while Blocksy's mobile Floating Cart is visible.
	 */
	body.single-product:has(.ct-drawer-canvas[data-floating-bar^="yes"]) > div:has(a[aria-label="focus"]) {
		bottom: calc(var(--sm-mobile-floating-cart-height) + env(safe-area-inset-bottom, 0px) + 8px) !important;
	}
}
