/*
 * Insulation / waterproofing gauges (inc/product-gauges.php, js/product-gauges.js).
 * Product-page rows open the „Szczegóły produktu" tab (single-product/meta.php) and borrow
 * the delivery rows' look: grey band on mobile, white on desktop, 15px text, the same ⓘ icon. A tap
 * opens the text inline; hover (desktop) shows their dark tooltip. A snowflake and
 * a droplet sit at the end of the price row on desktop and on the first gallery photo on
 * phones; listing cards show none.
 */

/* ---- Product page ---- */
.ms-gauges { display: grid; gap: 2px; margin-bottom: 16px; }

/* Shapes (inc/product-gauges.php ms_gauge_shape_svg): an outline, filled from the bottom. */
.ms-gauge-shape__line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.ms-gauge-shape__fill { stroke: none; }
.ms-gauge { position: relative; }
.ms-gauge__row {
	display: grid;
	grid-template-columns: 24px 1fr 20px;
	align-items: center;
	column-gap: 16px;
	row-gap: 6px;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 0;
	background: #f5f5f5;
	color: #262626;
	font: inherit;
	font-size: 15px;
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
@media (min-width: 768px) { .ms-gauge__row { background: #fff; } }
.ms-gauge__icon { width: 20px; height: 20px; color: #404040; }
.ms-gauge__more { width: 20px; height: 20px; color: #404040; }
.ms-gauge__bar {
	grid-column: 2 / 4;
	position: relative;
	height: 6px;
	border-radius: 3px;
	background: #e5e5e5;
	overflow: hidden;
}
.ms-gauge__bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.ms-gauge__bar--ins > span { background: #BF360C; }
.ms-gauge__bar--wp > span { background: #1d6fb8; }

/* A tap opens the text inline under the bar; on hover-capable screens hovering a closed
   row shows it as the dark tooltip the delivery rows use, so the page doesn't shift. */
.ms-gauge__info {
	padding: 0 12px 12px 52px;
	background: #f5f5f5;
	color: #404040;
	font-size: 14px;
	line-height: 1.45;
}
@media (min-width: 768px) { .ms-gauge__info { background: #fff; } }
.ms-gauge__info[hidden] { display: none; }
@media (hover: hover) {
	.ms-gauge:hover .ms-gauge__info[hidden] {
		display: block;
		position: absolute;
		left: 0;
		right: 0;
		bottom: calc(100% - 4px);
		z-index: 20;
		padding: 12px;
		border-radius: 4px;
		background: rgba(23, 23, 23, 0.92);
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
		color: #fff;
	}
}

/* ---- The icons (price row, first gallery photo) ---- */
/* Drawn like the heart above them (23px, #1f2937 outline 1.6). */
.ms-gauge-icons {
	position: relative;
	z-index: 4;
	flex: none;
	display: flex;
	flex-direction: row;
	gap: 8px;
	color: #1f2937;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.ms-gauge-icons::before { content: ""; position: absolute; inset: -10px; }
.ms-gauge-icons__icon { display: block; width: 23px; height: 23px; overflow: visible; }
.ms-gauge-icons__icon--ins .ms-gauge-shape__fill { fill: #BF360C; }
.ms-gauge-icons__icon--wp .ms-gauge-shape__fill { fill: #1d6fb8; }
.ms-gauge-icons__legend {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	padding: 8px 10px;
	border-radius: 4px;
	background: rgba(23, 23, 23, 0.92);
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
	flex-direction: column;
}
.ms-gauge-icons[aria-expanded="true"] .ms-gauge-icons__legend { display: flex; }
@media (hover: hover) { .ms-gauge-icons:hover .ms-gauge-icons__legend { display: flex; } }

/* ---- Product page price row (desktop) ---- */
/* The icons at the right end of the price row (single-product/price.php), like the
   TrustMate stars beside the brand line; the legend drops below them and opens leftwards.
   On phones they sit on the first gallery photo instead. */
.ms-price-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ms-gauge-icons--price { gap: 10px; margin-bottom: 9px; /* centred on the price figures */ }
@media (max-width: 767px) { .ms-gauge-icons--price { display: none; } }

/* ---- Product page first gallery photo (phones) ---- */
/* Top right of the first photo (single-product/product-thumbnails.php), where the magnifier
   was, on a light pill so they read on any photo; the legend drops below and opens leftwards.
   Not on the copies of the first photo the looping slider makes. */
.ms-gauge-icons--photo {
	position: absolute;
	top: 10px;
	right: 10px;
	gap: 10px;
	padding: 6px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
}
.splide__slide--clone .ms-gauge-icons--photo { display: none; }
