/* HTH Call Now Button - front-end styles */

.hthcb-wrap {
	position: fixed;
	z-index: var(--hthcb-z, 99990);
	line-height: 0;
	pointer-events: none;
}

.hthcb-wrap .hthcb-btn {
	pointer-events: auto;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	box-sizing: border-box;
	min-width: var(--hthcb-size, 60px);
	height: var(--hthcb-size, 60px);
	padding: 0;
	border: var(--hthcb-border, 0 solid transparent);
	border-radius: var(--hthcb-radius, 50%);
	background: var(--hthcb-bg, #1f9cd7);
	color: var(--hthcb-fg, #fff);
	box-shadow: var(--hthcb-shadow, 0 4px 14px rgba(0, 0, 0, 0.22));
	text-decoration: none;
	font-size: var(--hthcb-font, 16px);
	font-weight: 600;
	line-height: 1;
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.hthcb-wrap .hthcb-btn:hover,
.hthcb-wrap .hthcb-btn:focus {
	background: var(--hthcb-bg-hover, #1782b4);
	color: var(--hthcb-fg, #fff);
	text-decoration: none;
	transform: translateY(-2px);
}

.hthcb-wrap .hthcb-btn:focus-visible {
	outline: 3px solid var(--hthcb-fg, #fff);
	outline-offset: 3px;
}

.hthcb-wrap .hthcb-btn:active {
	transform: translateY(0);
}

.hthcb-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--hthcb-icon, 26px);
	height: var(--hthcb-icon, 26px);
	flex: 0 0 auto;
}

.hthcb-icon .hthcb-svg,
.hthcb-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	fill: currentColor;
}

.hthcb-label {
	white-space: nowrap;
	line-height: 1;
}

/* Labelled / pill variant gets horizontal padding. */
.hthcb-with-label .hthcb-btn {
	padding: 0 calc(var(--hthcb-size, 60px) * 0.3);
}

.hthcb-with-label.hthcb-label-left .hthcb-btn {
	flex-direction: row-reverse;
}

/* ---------- Positions ---------- */

.hthcb-pos-bottom-left {
	bottom: var(--hthcb-y, 20px);
	left: var(--hthcb-x, 20px);
}

.hthcb-pos-bottom-right {
	bottom: var(--hthcb-y, 20px);
	right: var(--hthcb-x, 20px);
}

.hthcb-pos-bottom-center {
	bottom: var(--hthcb-y, 20px);
	left: 50%;
	transform: translateX(-50%);
}

.hthcb-pos-middle-left {
	top: 50%;
	left: var(--hthcb-x, 20px);
	transform: translateY(-50%);
}

.hthcb-pos-middle-right {
	top: 50%;
	right: var(--hthcb-x, 20px);
	transform: translateY(-50%);
}

.hthcb-pos-top-left {
	top: var(--hthcb-y, 20px);
	left: var(--hthcb-x, 20px);
}

.hthcb-pos-top-right {
	top: var(--hthcb-y, 20px);
	right: var(--hthcb-x, 20px);
}

/* Keep hover lift from fighting the centring transforms. */
.hthcb-pos-bottom-center .hthcb-btn:hover,
.hthcb-pos-middle-left .hthcb-btn:hover,
.hthcb-pos-middle-right .hthcb-btn:hover {
	transform: none;
}

/* ---------- Tooltip ---------- */

.hthcb-has-tip .hthcb-btn[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	background: rgba(20, 24, 28, 0.92);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	padding: 7px 10px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.hthcb-pos-top-left .hthcb-btn[data-tip]::after,
.hthcb-pos-top-right .hthcb-btn[data-tip]::after {
	bottom: auto;
	top: calc(100% + 10px);
}

@media (hover: hover) {
	.hthcb-has-tip .hthcb-btn[data-tip]:hover::after,
	.hthcb-has-tip .hthcb-btn[data-tip]:focus::after {
		opacity: 1;
		visibility: visible;
	}
}

/* ---------- Pulse ---------- */

@media (prefers-reduced-motion: no-preference) {
	.hthcb-pulse .hthcb-btn::before {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: inherit;
		pointer-events: none;
		box-shadow: 0 0 0 0 var(--hthcb-bg, #1f9cd7);
		animation: hthcb-pulse 2.2s cubic-bezier(0.66, 0, 0, 1) infinite;
	}
}

@keyframes hthcb-pulse {
	0% {
		box-shadow: 0 0 0 0 var(--hthcb-bg, #1f9cd7);
		opacity: 0.65;
	}
	70% {
		box-shadow: 0 0 0 18px var(--hthcb-bg, #1f9cd7);
		opacity: 0;
	}
	100% {
		box-shadow: 0 0 0 0 var(--hthcb-bg, #1f9cd7);
		opacity: 0;
	}
}

/* ---------- Business hours states ---------- */

.hthcb-wrap .hthcb-btn--alt {
	background: var(--hthcb-alt-bg, #5a6b78);
}

.hthcb-wrap .hthcb-btn--alt:hover,
.hthcb-wrap .hthcb-btn--alt:focus {
	background: var(--hthcb-alt-bg, #5a6b78);
	filter: brightness( 0.9 );
}

.hthcb-pulse .hthcb-btn--alt::before {
	display: none;
}

.hthcb-has-bh.hthcb-state-open .hthcb-btn--alt {
	display: none;
}

.hthcb-has-bh.hthcb-state-closed .hthcb-btn--primary {
	display: none;
}

.hthcb-has-bh.hthcb-outside-hide.hthcb-state-closed {
	display: none;
}

/* Hidden until the script confirms state on cached pages. */
.hthcb-wrap.hthcb-checking {
	visibility: hidden;
}
