/*!
 * tri-consent.css — v2.0.0 (23/10/2026) — đi kèm tri-consent.js (dòng thông báo cookie một dòng + nút "Đã hiểu").
 * Dùng chung therealielts.vn / mocktest / tudien: CHÉP NGUYÊN, đổi màu bằng biến bên dưới
 * (đặt lại trên :root hoặc body ở site mình), không sửa file. Font kế thừa từ trang.
 *
 * Biến (mặc định = token theme.json của WordPress, có giá trị dự phòng cho site không có token):
 *   --tri-consent-primary   nút "Đã hiểu", link                  (action)
 *   --tri-consent-ink       chữ                                  (navy)
 *   --tri-consent-muted     chữ phụ                              (slate)
 *   --tri-consent-bg        nền dòng thông báo                   (white)
 *   --tri-consent-line      viền trên                            (ice)
 *   --tri-consent-bottom    cách đáy màn (vd chừa thanh menu dưới trên điện thoại)
 *   --tri-consent-z         lớp chồng
 */

.tri-consent {
	--tri-consent-primary: var(--wp--preset--color--action, #0053d1);
	--tri-consent-ink: var(--wp--preset--color--navy, #091f5b);
	--tri-consent-muted: var(--wp--preset--color--slate, #344054);
	--tri-consent-bg: var(--wp--preset--color--white, #ffffff);
	--tri-consent-line: var(--wp--preset--color--ice, #bad6eb);
	box-sizing: border-box;
	position: fixed;
	right: 0;
	bottom: var(--tri-consent-bottom, 0px);
	left: 0;
	z-index: var(--tri-consent-z, 60);
	padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--tri-consent-line);
	background: var(--tri-consent-bg);
	box-shadow: 0 -4px 16px color-mix(in srgb, var(--tri-consent-ink) 10%, transparent);
	color: var(--tri-consent-muted);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	animation: tri-consent-len 0.2s ease-out;
}

.tri-consent * {
	box-sizing: border-box;
}

@keyframes tri-consent-len {
	from {
		transform: translateY(8px);
		opacity: 0;
	}
}

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

.tri-consent__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	max-width: 1200px;
	margin: 0 auto;
}

.tri-consent__text {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
}

.tri-consent__link {
	color: var(--tri-consent-primary);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tri-consent__btn {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	margin: 0;
	padding: 0 14px;
	border: 1.5px solid var(--tri-consent-primary);
	border-radius: 999px;
	background: var(--tri-consent-primary);
	color: var(--tri-consent-bg);
	font: inherit;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.tri-consent__btn:hover {
	background: color-mix(in srgb, var(--tri-consent-primary) 86%, var(--tri-consent-ink));
}

.tri-consent__btn:focus-visible,
.tri-consent__link:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--tri-consent-primary) 45%, transparent);
	outline-offset: 2px;
}

/* Điện thoại: chữ + nút chảy chung một đoạn (nút nối cuối câu) → 2 dòng ở khổ 360–375px. */
@media (max-width: 600px) {
	.tri-consent {
		padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
		font-size: 12px;
		line-height: 1.4;
	}

	.tri-consent__inner {
		display: block;
	}

	.tri-consent__text {
		display: inline;
	}

	.tri-consent__btn {
		min-height: 26px;
		margin-left: 6px;
		padding: 0 10px;
		font-size: 12px;
		vertical-align: middle;
	}
}

.tri-consent-spacer {
	display: block;
	width: 100%;
}

/* Khi dòng thông báo đang hiện: phần tử được focus / cuộn tới (ô form, nút gửi) dừng phía trên nó. */
html.tri-consent-shown {
	scroll-padding-bottom: var(--tri-consent-h, 0px);
}
