/* TH Affiliate Finder – nút mua trên sàn, đồng bộ kiểu nút "Chat trực tiếp Facebook" */

/* Khung chứa: sản phẩm loại Bên ngoài/Affiliate (form.cart) và sản phẩm thường có link sàn (.thaf-market) */
.product-type-external form.cart,
.thaf-market {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
.product-type-external form.cart { margin: -14px 0 30px; }
.thaf-market { margin: 8px 0 28px; }

.thaf-market-head {
	color: #4a5568;
	font-size: 13.5px;
	text-align: center;
}

/* Nút */
.product-type-external form.cart .single_add_to_cart_button,
.thaf-market .thaf-btn {
	--thaf-c1: #ff7a45;
	--thaf-c2: #ee4d2d;
	--thaf-c3: #d73211;
	--thaf-glow: rgba(238, 77, 45, .35);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 245px;
	height: auto;
	min-height: 52px;
	margin: 0;
	padding: 13px 26px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--thaf-c1), var(--thaf-c2) 55%, var(--thaf-c3));
	box-shadow: 0 8px 20px var(--thaf-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.product-type-external form.cart .single_add_to_cart_button::before,
.thaf-market .thaf-btn::before {
	content: "";
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	background-color: #fff;
	-webkit-mask: var(--thaf-icon) center / contain no-repeat;
	mask: var(--thaf-icon) center / contain no-repeat;
	--thaf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7V6a5 5 0 0 1 10 0v1h2.2a1 1 0 0 1 1 .92l1 13A1 1 0 0 1 20.2 22H3.8a1 1 0 0 1-1-1.08l1-13A1 1 0 0 1 4.8 7H7zm2 0h6V6a3 3 0 0 0-6 0v1zm.2 6.7c.3 1.5 1.5 2.3 2.8 2.3s2.5-.8 2.8-2.3l-1.9-.4c-.1.5-.5.8-.9.8s-.8-.3-.9-.8l-1.9.4z' fill='%23000'/%3E%3C/svg%3E");
}
.product-type-external form.cart .single_add_to_cart_button:hover,
.product-type-external form.cart .single_add_to_cart_button:focus-visible,
.thaf-market .thaf-btn:hover,
.thaf-market .thaf-btn:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.05);
	box-shadow: 0 12px 26px var(--thaf-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
	color: #fff;
	outline: none;
}
.product-type-external form.cart .single_add_to_cart_button:active,
.thaf-market .thaf-btn:active { transform: translateY(0); }

/* Màu theo sàn */
.thaf-market .thaf-btn-tiktok,
.product-type-external.thaf-tiktok form.cart .single_add_to_cart_button {
	--thaf-c1: #2b2b2b; --thaf-c2: #111; --thaf-c3: #000; --thaf-glow: rgba(0, 0, 0, .3);
}
.product-type-external.thaf-lazada form.cart .single_add_to_cart_button {
	--thaf-c1: #3b5bff; --thaf-c2: #1a2fc9; --thaf-c3: #0f1a8f; --thaf-glow: rgba(26, 47, 201, .3);
}
.product-type-external.thaf-tiki form.cart .single_add_to_cart_button {
	--thaf-c1: #36a9ff; --thaf-c2: #1a94ff; --thaf-c3: #0b74e5; --thaf-glow: rgba(26, 148, 255, .32);
}

/* Dòng phụ dưới nút (giống dòng trạng thái dưới nút Facebook) */
.thaf-buy-note {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #4a5568;
	font-size: 12.5px;
	line-height: 1.5;
	text-align: center;
}
.thaf-buy-note::before {
	content: "";
	flex: 0 0 7px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ee4d2d;
	box-shadow: 0 0 0 3px rgba(238, 77, 45, .22);
}
.thaf-tiktok .thaf-buy-note::before,
.thaf-note-tiktok::before { background: #111; box-shadow: 0 0 0 3px rgba(0, 0, 0, .15); }
.thaf-lazada .thaf-buy-note::before { background: #1a2fc9; box-shadow: 0 0 0 3px rgba(26, 47, 201, .2); }
.thaf-tiki .thaf-buy-note::before { background: #1a94ff; box-shadow: 0 0 0 3px rgba(26, 148, 255, .2); }
.thaf-note-mix::before { background: #31d158; box-shadow: 0 0 0 3px rgba(49, 209, 88, .25); }

@media (max-width: 549px) {
	.product-type-external form.cart .single_add_to_cart_button,
	.thaf-market .thaf-btn { width: 100%; max-width: 360px; white-space: normal; }
}
