/*
 * W3SEO DKKD Hotline Float
 * Mobile-first floating call buttons.
 */

.w3hf {
	--w3hf-blue: #0b63ce;
	--w3hf-blue-2: #0e7ce6;
	--w3hf-teal: #0aa6a6;
	--w3hf-text: #0b1f3a;
	--w3hf-bottom: calc(88px + env(safe-area-inset-bottom, 0px));

	position: fixed;
	z-index: 99950;
	bottom: var(--w3hf-bottom);
	display: none;
	width: min(265px, calc(100vw - 28px));
	gap: 9px;
	pointer-events: none;
}

.w3hf--right {
	right: 14px;
}

.w3hf--left {
	left: 14px;
}

.w3hf__label {
	align-self: flex-end;
	padding: 5px 10px;
	border: 1px solid rgba(11, 99, 206, .14);
	border-radius: 999px;
	background: rgba(255, 255, 255, .96);
	color: #4b647f;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
	box-shadow: 0 5px 18px rgba(11, 31, 58, .08);
	backdrop-filter: blur(8px);
	pointer-events: auto;
}

.w3hf--left .w3hf__label {
	align-self: flex-start;
}

.w3hf__item {
	position: relative;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 58px;
	padding: 7px 10px 7px 8px;
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 18px;
	color: #fff;
	text-decoration: none !important;
	box-shadow:
		0 12px 28px rgba(11, 31, 58, .20),
		0 2px 8px rgba(11, 31, 58, .10);
	overflow: hidden;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
	isolation: isolate;
}

.w3hf__item::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(135deg, var(--w3hf-blue), var(--w3hf-blue-2));
}

.w3hf__item--2::before {
	background: linear-gradient(135deg, #087f8c, var(--w3hf-teal));
}

.w3hf__item::after {
	content: "";
	position: absolute;
	top: -30px;
	right: -24px;
	width: 95px;
	height: 95px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .10);
	z-index: -1;
}

.w3hf__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .18);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.w3hf__icon svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.w3hf__text {
	display: flex;
	min-width: 0;
	flex-direction: column;
	line-height: 1.15;
}

.w3hf__name {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.w3hf__call {
	padding: 6px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	font-size: 10px;
	font-weight: 800;
	white-space: nowrap;
}

.w3hf__item:active {
	transform: translateY(1px) scale(.992);
}

.w3hf__icon::after {
	content: "";
	position: absolute;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	border: 2px solid rgba(255, 255, 255, .38);
	animation: w3hf-ring 2.2s ease-out infinite;
}

@keyframes w3hf-ring {
	0% {
		transform: scale(.82);
		opacity: .75;
	}
	75%,
	100% {
		transform: scale(1.45);
		opacity: 0;
	}
}

@media (max-width: 782px) {
	.w3hf {
		display: flex;
		flex-direction: column;
	}
}

@media (max-width: 390px) {
	.w3hf {
		width: min(248px, calc(100vw - 24px));
		right: 12px;
	}

	.w3hf--left {
		left: 12px;
		right: auto;
	}

	.w3hf__item {
		grid-template-columns: 40px minmax(0, 1fr) auto;
		gap: 8px;
		min-height: 54px;
		border-radius: 16px;
	}

	.w3hf__icon {
		width: 40px;
		height: 40px;
		border-radius: 12px;
	}

	.w3hf__icon::after {
		width: 40px;
		height: 40px;
		border-radius: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.w3hf__icon::after {
		animation: none;
	}
}

/* Không in float button khi print */
@media print {
	.w3hf {
		display: none !important;
	}
}
