/* Thông báo "vừa đăng ký tư vấn" (inc/consult-live.php, assets/js/consult-live.js).
   Máy tính: góc TRÁI dưới — góc phải đã có Zalo / Hotline / Tawk / CTA cuộn.
   Điện thoại: ngay dưới header, để đáy màn cho thanh dưới + nút nổi. */
.tri-cl {
	position: fixed;
	z-index: 60;
	left: 20px;
	/* Tablet có thanh dưới màn (--tri-bottombar-h, bằng 0 trên máy tính) — đứng trên nó. */
	bottom: calc(var(--tri-bottombar-h, 0px) + 20px);
	max-width: min(360px, calc(100vw - 40px));
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

.tri-cl.is-on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.tri-cl__card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 36px 12px 14px;
	border-radius: 14px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--navy);
	text-decoration: none;
	box-shadow: 0 8px 28px color-mix(in srgb, var(--wp--preset--color--navy) 18%, transparent);
	border: 1px solid var(--wp--preset--color--ice);
}

.tri-cl__dot {
	flex: none;
	width: 10px;
	height: 10px;
	margin-top: 5px;
	border-radius: 50%;
	background: var(--wp--preset--color--cyan);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--wp--preset--color--cyan) 50%, transparent);
	animation: tri-cl-pulse 1.8s ease-out infinite;
}

.tri-cl__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: 14px;
	line-height: 1.4;
}

.tri-cl__text {
	font-weight: 700;
}

.tri-cl__time {
	font-size: 12px;
	color: var(--wp--preset--color--royal);
}

.tri-cl__cta {
	margin-top: 2px;
	font-size: 13px;
	font-weight: 800;
	color: var(--wp--preset--color--orange);
}

.tri-cl__card:hover .tri-cl__cta,
.tri-cl__card:focus-visible .tri-cl__cta {
	color: var(--wp--preset--color--orange-hover);
	text-decoration: underline;
}

.tri-cl__close {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--royal);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.tri-cl__close:hover,
.tri-cl__close:focus-visible {
	background: var(--wp--preset--color--muted);
}

@keyframes tri-cl-pulse {
	70%,
	100% { box-shadow: 0 0 0 8px transparent; }
}

body:has(.tri-mobile-bar.is-hidden) .tri-cl {
	bottom: 20px;
}

@media (max-width: 767px) {
	.tri-cl,
	body:has(.tri-mobile-bar.is-hidden) .tri-cl {
		left: 12px;
		right: 12px;
		bottom: auto;
		/* + thanh admin WordPress (biến của core, chỉ có khi đăng nhập). */
		top: calc(var(--tri-header-h, 64px) + var(--wp-admin--admin-bar--height, 0px) + 8px);
		max-width: none;
		transform: translateY(-12px);
	}

	.tri-cl__card {
		align-items: center;
		padding: 10px 40px 10px 12px;
	}

	.tri-cl__dot {
		margin-top: 0;
	}

	/* Một dòng chữ + một dòng "5 phút trước · Đăng ký ngay →" cho gọn. */
	.tri-cl__body {
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 8px;
		font-size: 13px;
	}

	.tri-cl__text {
		grid-column: 1 / -1;
	}

	.tri-cl__cta {
		margin-top: 0;
		font-size: 12px;
	}

	.tri-cl__close {
		top: 50%;
		transform: translateY(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tri-cl,
	.tri-cl__dot {
		transition: none;
		animation: none;
	}
}
