/*
 * 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).
 *
 * Variant «А» of 14.10.2026 (owner: «давай А»): a white circle of 48 px with
 * the handset and the messengers' small marks, and a list of four thin rows
 * in place of the card with a title, coloured circles and a wide button.
 * The call-back is one line — «+380», nine digits, a round arrow — under
 * its own row, with the hours beneath it.
 */
.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: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 50%;
	color: var(--wp--preset--color--brand-action);
	background: var(--wp--preset--color--base);
	box-shadow: 0 2px 10px color-mix(in srgb, var(--wp--preset--color--ink) 14%, transparent);
	cursor: grab;
	touch-action: none;
	order: 2;
	position: relative;
}

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

.gsl-contact.is-open .gsl-contact__fab {
	background: var(--wp--preset--color--surface);
}

.gsl-contact__phone-ic {
	width: 24px;
	height: 24px;
}

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

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

/* The messengers' marks on the circle's edge (owner, 01.10.2026: a handset
   alone says «call» and nothing more). The logos keep their own colours in
   the markup — that is what makes them recognisable. */
.gsl-contact__badge {
	position: absolute;
	left: -3px;
	display: block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--wp--preset--color--base);
	pointer-events: none;
}

.gsl-contact__badge svg {
	display: block;
	width: 16px;
	height: 16px;
}

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

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

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

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

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

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

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

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

.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: 24px;
	height: 24px;
	color: var(--wp--preset--color--brand-text);
}

.gsl-contact__ic svg {
	display: block;
	width: 20px;
	height: 20px;
}

.gsl-contact__text {
	display: flex;
	align-items: baseline;
	gap: var(--wp--preset--spacing--20);
	min-width: 0;
}

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

/* The call-back line under its row, indented to the row's text. */
.gsl-contact__back {
	padding: 2px 10px var(--wp--preset--spacing--20) 44px;
}

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

.gsl-contact__form {
	display: flex;
	align-items: center;
	gap: 6px;
}

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

.gsl-contact__prefix {
	flex: none;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--muted);
}

.gsl-contact__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 40px;
	padding: 0 var(--wp--preset--spacing--20);
	border: 0;
	border-bottom: 1.5px solid var(--wp--preset--color--border-strong);
	border-radius: 0;
	background: none;
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: 0.02em;
}

.gsl-contact__input:focus {
	outline: 0;
	border-bottom-color: var(--wp--preset--color--brand-action);
}

.gsl-contact__send {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--gold);
	cursor: pointer;
}

.gsl-contact__send svg {
	display: block;
	width: 20px;
	height: 20px;
}

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

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

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

/* The hours at rest, the answer after sending: green when the call is on its way, red when not. */
.gsl-contact__note {
	margin: 6px 0 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.35;
	color: var(--wp--preset--color--muted);
}

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

.gsl-contact__note.is-error {
	color: var(--wp--preset--color--sale);
}

/* «Спробувати ще раз» after the countdown: a link-like word under the note. */
.gsl-contact__again {
	margin: 4px 0 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--brand-text);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.gsl-contact__again[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;
	}
}

/* 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;
	}
}
