/** Professional Standards — contact-dock. */

.ps-dock {
	--ps-dock-gap: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
	--ps-dock-size: clamp(3rem, 2.75rem + 0.6vw, 3.4rem);

	position: fixed;
	z-index: 85;
	inset-block-end: calc(var(--ps-dock-gap) + env(safe-area-inset-bottom, 0px));
	inset-inline-start: var(--ps-dock-gap);
}

.ps-dock__list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ps-dock__link {
	--ps-focus: var(--ps-focus-inverse, var(--ps-color-turquoise));

	position: relative;
	display: grid;
	place-items: center;
	inline-size: var(--ps-dock-size);
	block-size: var(--ps-dock-size);
	border: 1px solid rgb(255 255 255 / 0.18);
	border-radius: 50%;
	color: var(--ps-color-neutral-0, #fff);
	text-decoration: none;
	box-shadow: 0 12px 26px -12px rgb(23 75 53 / 0.65);
	transition: translate var(--ps-duration-base) var(--ps-ease-out), box-shadow var(--ps-duration-base) linear;
}

.ps-dock__link--whatsapp {
	background-color: #1da851;
}

.ps-dock__link--phone {
	border-color: rgb(2 149 77 / 0.55);
	background-color: var(--ps-color-navy);
}

.ps-dock__icon {
	--ps-icon-size: calc(var(--ps-dock-size) * 0.46);
	--ps-icon-stroke: 2;
}

.ps-dock__link:hover,
.ps-dock__link:focus-visible {
	translate: 0 -2px;
	box-shadow: 0 16px 30px -12px rgb(23 75 53 / 0.75);
}

/* WhatsApp says hello once, a little after the page opens (a soft ring, twice). */
.ps-dock__link--whatsapp::after {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: 50%;
	border: 2px solid #1da851;
	opacity: 0;
	pointer-events: none;
	animation: ps-dock-ring 1.8s var(--ps-ease-out, ease-out) 2.5s 2;
}

@keyframes ps-dock-ring {
	0% {
		opacity: 0.7;
		scale: 1;
	}

	100% {
		opacity: 0;
		scale: 1.55;
	}
}

/* The label beside the button: on hover (a mouse) and on keyboard focus. */
.ps-dock__tip {
	position: absolute;
	inset-block-start: 50%;
	/* Beside the button, toward the page (inset from the start edge: past the button's own width). */
	inset-inline-start: calc(100% + 0.6rem);
	padding: 0.35rem 0.85rem;
	border-radius: var(--ps-radius-pill);
	background-color: var(--ps-color-navy);
	color: var(--ps-color-neutral-0, #fff);
	font-family: var(--ps-font-sans);
	font-size: var(--ps-step--1);
	line-height: 1.4;
	white-space: nowrap;
	box-shadow: 0 8px 20px -10px rgb(23 75 53 / 0.6);
	opacity: 0;
	translate: 0 -50%;
	pointer-events: none;
	transition: opacity var(--ps-duration-base) linear;
}

.ps-dock__link:focus-visible .ps-dock__tip {
	opacity: 1;
}

@media (hover: hover) {
	.ps-dock__link:hover .ps-dock__tip {
		opacity: 1;
	}
}

/* Still: no lift, no ring (reduced motion, or the footer's «إيقاف الحركة»). */
@media (prefers-reduced-motion: reduce) {
	.ps-dock__link,
	.ps-dock__link:hover,
	.ps-dock__link:focus-visible {
		translate: none;
		transition: none;
	}

	.ps-dock__link--whatsapp::after {
		animation: none;
	}
}

[data-ps-motion="off"] .ps-dock__link--whatsapp::after {
	animation: none;
}

/* High contrast: the buttons keep an edge and their icons. */
@media (forced-colors: active) {
	.ps-dock__link {
		border: 2px solid ButtonText;
	}
}

@media print {
	.ps-dock {
		display: none;
	}
}
