/**
 * TD Lighting Contact Bar — frontend
 */

.td-lc-bar {
	--td-lc-offset-y: 0px;
	position: fixed;
	z-index: var(--td-lc-z, 99999);
	display: block;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.td-lc-bar--right {
	right: 0;
	left: auto;
}

.td-lc-bar--left {
	left: 0;
	right: auto;
}

.td-lc-bar--center {
	top: 50%;
	transform: translateY(calc(-50% + var(--td-lc-offset-y, 0px)));
}

.td-lc-bar--top {
	top: max(24px, env(safe-area-inset-top, 0px));
	transform: translateY(var(--td-lc-offset-y, 0px));
}

.td-lc-bar--bottom {
	top: auto;
	bottom: max(24px, env(safe-area-inset-bottom, 0px));
	transform: translateY(var(--td-lc-offset-y, 0px));
}

.td-lc-bar__inner {
	display: flex;
	flex-direction: column;
	width: var(--td-lc-size, 56px);
	pointer-events: auto;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	border-radius: 10px 0 0 10px;
	overflow: hidden;
}

.td-lc-bar--left .td-lc-bar__inner {
	border-radius: 0 10px 10px 0;
}

.td-lc-bar__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--td-lc-size, 56px);
	height: var(--td-lc-size, 56px);
	margin: 0;
	padding: 0;
	background: var(--td-lc-primary, #f18701);
	color: var(--td-lc-icon, #fff);
	border: none;
	border-bottom: 1px solid var(--td-lc-sep, rgba(255, 255, 255, 0.35));
	text-decoration: none;
	transition: background 0.2s ease, transform 0.15s ease;
}

.td-lc-bar__btn:last-child {
	border-bottom: none;
}

/* Chỉ làm tối nền — không dùng filter (filter làm icon currentColor bị chìm). */
.td-lc-bar__btn:hover,
.td-lc-bar__btn:focus-visible {
	color: var(--td-lc-icon, #fff);
	background: color-mix(in srgb, var(--td-lc-primary, #f18701) 82%, #000);
	outline: none;
}

.td-lc-bar__btn:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.td-lc-bar__btn:active {
	transform: scale(0.98);
}

.td-lc-bar__svg {
	display: block;
	width: 26px;
	height: 26px;
}

.td-lc-bar__svg--zalo {
	width: 26px;
	height: 26px;
}

.td-lc-bar__img {
	display: block;
	max-width: 70%;
	max-height: 70%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.td-lc-bar__img--zalo {
	max-height: 28px;
	max-width: 80%;
}

/* Fallback khi không có color-mix: lớp đen mờ trên nền — không ảnh hưởng màu icon */
@supports not (background: color-mix(in srgb, #000 50%, #fff)) {
	.td-lc-bar__btn:hover,
	.td-lc-bar__btn:focus-visible {
		color: var(--td-lc-icon, #fff);
		background: linear-gradient(
				rgba(0, 0, 0, 0.14),
				rgba(0, 0, 0, 0.14)
			),
			var(--td-lc-primary, #f18701);
	}
}

@media (max-width: 782px) {
	.td-lc-bar--hide-mobile {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.td-lc-bar__btn {
		transition: none;
	}
}
