/*
 * The mini-summary: the middle layer of the three-layer description.
 * Prose first, then measured facts as named chips — «Розмір: 8 мм»,
 * «Отвір: 1,5 мм», the material on its own (concept 2, owner 17.09.2026).
 * White chips with a hairline, no card around them: the page is white now.
 */
.gsl-summary {
	margin-block: 0;
}

.gsl-summary__text {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.55;
	color: var(--wp--preset--color--contrast);
}

.gsl-summary__text:last-child {
	margin-bottom: 0;
}

.gsl-summary__facts {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.gsl-summary__fact {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	padding: 6px 9px;
	font-size: var(--wp--preset--font-size--small);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--small);
	white-space: nowrap;
}

.gsl-summary__factlabel {
	color: var(--wp--preset--color--muted);
}

.gsl-summary__factvalue {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

/* The material or the stone needs no name: «Пластик» says it. */
.gsl-summary__fact--term .gsl-summary__factlabel {
	display: none;
}

/* A chip with somewhere to go looks like every chip, plus a green corner
   in the stock green (owner, 24.09.2026: «клацнув у зелений — відкрилось,
   не в зелений — ні»; regulars learn it in a few taps). Inside, a button
   that keeps the chip's size exactly. */
.gsl-summary {
	position: relative;
}

.gsl-summary__fact--pivot {
	position: relative;
	overflow: hidden;
	padding: 0;
}

.gsl-summary__fact--pivot::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	border-style: solid;
	border-width: 0 10px 10px 0;
	border-color: transparent var(--wp--preset--color--in-stock) transparent transparent;
	pointer-events: none;
}

.gsl-summary__factbtn {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	margin: 0;
	padding: 6px 9px;
	font: inherit;
	line-height: inherit;
	min-height: 0;
	color: inherit;
	background: none;
	border: 0;
	border-radius: inherit;
	box-shadow: none;
	cursor: pointer;
}

.gsl-summary__fact--pivot:has(.gsl-summary__factbtn[aria-expanded="true"]) {
	border-color: var(--wp--preset--color--contrast);
}

.gsl-summary__factbtn:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: -2px;
}

/* The one button a tap unfolds floats ABOVE its chip, over the page, with
   a tail pointing at the chip (owner, 24.09.2026). Above, not below: below
   it covered the quantity and «Додати у кошик» on every phone measured;
   above it covers only the price, and only while open. The script places
   it and folds it on scroll, a tap elsewhere or Escape. */
.gsl-summary__pivot {
	position: absolute;
	z-index: 30;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	width: max-content;
	max-width: 100%;
	min-height: 44px;
	margin: 0;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--in-stock);
	border-radius: var(--wp--custom--radius--small);
	box-shadow: 0 6px 24px color-mix(in srgb, var(--wp--preset--color--ink) 18%, transparent);
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.gsl-summary__pivot::after {
	content: "";
	position: absolute;
	bottom: -7px;
	left: var(--gsl-arrow-x, 24px);
	width: 12px;
	height: 12px;
	background: var(--wp--preset--color--base);
	border-right: 1px solid var(--wp--preset--color--in-stock);
	border-bottom: 1px solid var(--wp--preset--color--in-stock);
	transform: translateX(-50%) rotate(45deg);
}

.gsl-summary__pivot[hidden] {
	display: none;
}

.gsl-summary__pivotmore {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--base);
}

.gsl-summary__pivotmore::after {
	content: "\203A";
	margin-left: 6px;
}

.gsl-summary__pivotwhat {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
