/*
 * The floating contact button (Contact\Widget). Bottom right by default,
 * above the product page's buy bar and the desktop «to top» button; the
 * shopper can drag it to either side at any height (contact-widget.js).
 */
.gsl-contact {
	position: fixed;
	right: var(--wp--preset--spacing--30);
	bottom: 96px;
	z-index: 60;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.gsl-contact[data-side="left"] {
	align-items: flex-start;
}

.gsl-contact__fab {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--brand-action);
	box-shadow: 0 6px 18px color-mix(in srgb, var(--wp--preset--color--ink) 28%, transparent);
	cursor: grab;
	touch-action: none;
	order: 2;
	position: relative;
	transition: width 0.25s ease, border-radius 0.25s ease;
}

.gsl-contact.is-dragging .gsl-contact__fab {
	cursor: grabbing;
	transform: scale(1.06);
}

.gsl-contact__close-ic,
.gsl-contact.is-open .gsl-contact__phone-ic {
	display: none;
}

.gsl-contact.is-open .gsl-contact__close-ic {
	display: block;
}

.gsl-contact__panel {
	order: 1;
	width: min(300px, calc(100vw - 24px));
	margin-bottom: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--ink) 22%, transparent);
}

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

.gsl-contact__title {
	margin: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20) var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--ink);
}

.gsl-contact__row {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	width: 100%;
	min-height: 48px;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	border: 0;
	border-radius: var(--wp--custom--radius--small);
	background: none;
	font: inherit;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	text-align: left;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	cursor: pointer;
}

.gsl-contact__row:hover,
.gsl-contact__row:focus-visible {
	background: var(--wp--preset--color--surface);
}

.gsl-contact__ic {
	flex: none;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--brand-action);
}

.gsl-contact__ic--back {
	background: var(--wp--preset--color--gold-text);
}

/* Telegram and Viber rows carry the messengers' own round marks. */
.gsl-contact__ic--tg,
.gsl-contact__ic--viber {
	background: none;
}

.gsl-contact__text {
	display: flex;
	flex-direction: column;
}

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

.gsl-contact__form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10);
	padding: 0 var(--wp--preset--spacing--20) var(--wp--preset--spacing--20);
}

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

.gsl-contact__input {
	flex: 1 1 100%;
	min-height: 44px;
	padding: 0 var(--wp--preset--spacing--30);
	border: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--small);
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
}

.gsl-contact__send {
	flex: 1 1 100%;
	min-height: 44px;
	border: 0;
	border-radius: var(--wp--custom--radius--small);
	font: inherit;
	font-weight: 700;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--gold);
	cursor: pointer;
}

.gsl-contact__send:disabled {
	opacity: 0.6;
}

.gsl-contact__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.gsl-contact__note {
	flex: 1 1 100%;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--sale);
}

.gsl-contact__note.is-ok {
	color: var(--wp--preset--color--in-stock);
}

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

/* Desktop: above the «to top» button in the corner. */
@media (min-width: 641px) {
	.gsl-contact {
		right: var(--wp--preset--spacing--50);
		bottom: 88px;
	}
}

/* The call-back row is a button: no native look, the row look instead. */
.gsl-contact__row--back {
	appearance: none;
}

/* ---- The messengers on the button (owner, 01.10.2026: research options 4 + 2).
   At rest a circle with the handset and the Viber and Telegram marks sitting
   on its edge — a handset alone says «call» and nothing more. On the first
   screen of a visit it opens into a pill «[☎][Viber][Telegram] Зв'язатися»
   and folds for good at the first scroll (contact-widget.js). No endless
   pulse: steady motion in the corner pulls the eye off the goods. */
.gsl-contact__badge {
	position: absolute;
	left: -4px;
	display: block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--wp--preset--color--base);
	pointer-events: none;
}

.gsl-contact__badge svg {
	display: block;
}

.gsl-contact__badge--viber {
	top: -4px;
}

.gsl-contact__badge--tg {
	bottom: -4px;
}

.gsl-contact[data-side="left"] .gsl-contact__badge {
	left: auto;
	right: -4px;
}

.gsl-contact.is-open .gsl-contact__badge,
.gsl-contact__label {
	display: none;
}

.gsl-contact.is-wide .gsl-contact__fab {
	display: flex;
	align-items: center;
	gap: 6px;
	width: auto;
	padding: 0 var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--pill);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--base);
	white-space: nowrap;
}

.gsl-contact.is-wide .gsl-contact__badge {
	position: static;
	box-shadow: none;
}

.gsl-contact.is-wide .gsl-contact__label {
	display: inline;
	margin-left: 4px;
}

.gsl-contact.is-wide .gsl-contact__phone-ic {
	flex: none;
	width: 22px;
	height: 22px;
}

@media (prefers-reduced-motion: reduce) {
	.gsl-contact__fab {
		transition: none;
	}
}

/* Out of the way while a product page's add-to-cart form is on a phone
   screen; back with the sticky buy bar (contact-widget.js). */
@media (max-width: 640px) {
	.gsl-contact.is-parked {
		display: none;
	}
}

/* The old design (footer switch, 01.10.2026) had no floating button. */
:root.gsl-design-old .gsl-contact {
	display: none;
}

