/* Đặt Hàng Sỉ - Wholesale Order Popup */

/* ---------- Nút mở popup ---------- */
a.wsop-btn {
	display: inline-block;
	clear: both;
	width: 100%;
	max-width: 350px;
	margin: 0 0 20px;
	padding: 9px 0;
	overflow: hidden;
	border-bottom: 0 !important;
	border-radius: 4px;
	background: #f59000;
	background: linear-gradient(to bottom, #fd6e1d, #f59000);
	color: #fff !important;
	font-size: 18px;
	line-height: normal;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}
a.wsop-btn:hover,
a.wsop-btn:focus {
	background: linear-gradient(to bottom, #f59000, #fd6e1d);
	color: #fff;
	text-decoration: none !important;
}
a.wsop-btn span {
	display: block;
	margin: 2px 0 0;
	color: #fff;
	font-size: 14px;
	text-transform: none;
}

/* ---------- Popup ---------- */
html.wsop-lock { overflow: hidden; }

.wsop-overlay,
.wsop-overlay * { box-sizing: border-box; }

.wsop-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background: rgba(11, 11, 11, .8);
	font-family: -apple-system, "Segoe UI", Roboto, Tahoma, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.35;
	color: #333;
}
.wsop-overlay[hidden],
.wsop-overlay [hidden] { display: none !important; }

.wsop-dialog {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1120px;
	height: min(760px, calc(100vh - 24px));
	height: min(760px, calc(100dvh - 24px));
	overflow: hidden;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .6);
	outline: 0;
}

.wsop-head {
	position: relative;
	flex: 0 0 auto;
	padding: 0 48px 0 20px;
	height: 44px;
	line-height: 44px;
	background: linear-gradient(to bottom, #c69a39, #c19a4b);
	color: #fff;
	font-size: 16px;
	text-transform: uppercase;
}
.wsop-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.wsop-overlay .wsop-close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: transform .25s ease;
}
.wsop-overlay .wsop-close:before,
.wsop-overlay .wsop-close:after {
	content: "";
	position: absolute;
	top: 13px;
	left: 6px;
	width: 16px;
	height: 2px;
	background: #fff;
	transform: rotate(45deg);
}
.wsop-overlay .wsop-close:after { transform: rotate(-45deg); }
.wsop-overlay .wsop-close:hover { transform: rotate(90deg); }
.wsop-overlay .wsop-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.wsop-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; container-type: inline-size; container-name: wsopbody; }
.wsop-cols { flex: 1 1 auto; min-height: 0; display: flex; }
.wsop-success { padding: 30px 20px; overflow: auto; }

/* ---------- Cột trái ---------- */
/* Bố cục danh sách chọn theo độ rộng của chính khung này (cột hẹp trong trang → xếp chồng, cột rộng → dạng bảng) */
.wsop-left {
	container-type: inline-size;
	container-name: wsopleft;
	flex: 1 1 58%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 12px;
	border-right: 1px solid #e6e6e6;
}
.wsop-toolbar { display: flex; gap: 6px; margin-bottom: 8px; }
.wsop-overlay .wsop-toolbar input,
.wsop-overlay .wsop-toolbar select {
	height: 34px;
	margin: 0;
	padding: 4px 8px;
	border: 1px solid #ccc;
	border-radius: 2px;
	background: #fff;
	font-size: 13px;
	box-shadow: none;
}
.wsop-overlay .wsop-toolbar input { flex: 0 0 150px; min-width: 0; }

/* Ô chọn danh mục: dạng nút bấm màu xanh lá, dài hơn ô tìm kiếm */
.wsop-overlay .wsop-toolbar select {
	flex: 1 1 auto;
	min-width: 0;
	max-width: none;
	padding-right: 30px;
	border: 0;
	border-radius: 3px;
	background: #1f9d3a url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='white' stroke-width='2'/></svg>") no-repeat right 11px center;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.wsop-overlay .wsop-toolbar select:hover { background-color: #178a31; }
.wsop-overlay .wsop-toolbar select option { background: #fff; color: #333; font-weight: 400; }

.wsop-vol-note { margin: 0 0 8px; padding: 7px 10px; border-left: 4px solid #fd7518; border-radius: 2px; background: #fff4e8; color: #b45f06; font-size: 13px; font-weight: 700; line-height: 1.4; }
.wsop-vol-note.is-active { border-color: #0b6b24; background: #e6f4ea; color: #0b6b24; }
.wsop-trow-vol b { color: #0b6b24; }
.wsop-listmsg { margin-bottom: 6px; padding: 4px 8px; background: #fff4e5; color: #b45f06; font-size: 12px; }

.wsop-list {
	flex: 1 1 auto;
	min-height: 120px;
	overflow-y: auto;
	border: 1px solid #e6e6e6;
	border-radius: 2px;
	-webkit-overflow-scrolling: touch;
}
.wsop-list.is-loading { opacity: .55; pointer-events: none; }
.wsop-empty { margin: 0; padding: 24px 12px; color: #777; text-align: center; }

/* ---- Danh sách sản phẩm dạng bảng gọn, các cột thẳng hàng ---- */
.wsop-listhead { display: none; }
.wsop-prod { border-bottom: 1px solid #eee; background: #fff; }
.wsop-prod:last-child { border-bottom: 0; }
.wsop-prod.is-pinned { box-shadow: inset 3px 0 0 #c69a39; }
.wsop-prod.is-oos,
.wsop-row.is-oos { opacity: .55; }

.wsop-grid {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	grid-template-areas: "img meta act" "img price act";
	gap: 1px 10px;
	align-items: center;
	padding: 8px 10px;
}
.wsop-grid > .wsop-thumb { grid-area: img; }
.wsop-grid > .wsop-meta { grid-area: meta; min-width: 0; }
.wsop-grid > .wsop-pc { grid-area: price; }
.wsop-grid > .wsop-act { grid-area: act; }

.wsop-prod:not(.is-variable).is-selected { background: #fff8ec; box-shadow: inset 3px 0 0 #fd7518; }
.wsop-phead { cursor: pointer; }
.wsop-phead:hover { background: #faf7ee; }
.wsop-prod.is-open > .wsop-phead { background: #fbf8f0; }
.wsop-prod.has-selected > .wsop-phead { box-shadow: inset 3px 0 0 #fd7518; }

.wsop-overlay .wsop-thumb { width: 40px; height: 40px; margin: 0; border-radius: 3px; object-fit: cover; background: #f3f3f3; }
.wsop-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #222; overflow-wrap: anywhere; }
.wsop-sub { margin-top: 1px; font-size: 12px; color: #888; }
.wsop-pc { line-height: 1.25; }
.wsop-price { color: #e03232; font-weight: 700; font-size: 13px; white-space: nowrap; }
.wsop-old { margin-right: 6px; color: #aaa; text-decoration: line-through; font-size: 11.5px; white-space: nowrap; }
.wsop-sku { color: #999; }
.wsop-sku:before { content: "Mã: "; }
.wsop-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #fd7518; color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }

/* Nút mở/thu gọn phân loại */
.wsop-chev { position: relative; display: block; width: 28px; height: 28px; margin-left: auto; border: 1px solid #d6d6d6; border-radius: 50%; background: #fff; }
.wsop-chev:after { content: ""; position: absolute; top: 8px; left: 9px; width: 7px; height: 7px; border-right: 2px solid #777; border-bottom: 2px solid #777; transform: rotate(45deg); }
.wsop-prod.is-open .wsop-chev:after { top: 11px; transform: rotate(-135deg); }

@container wsopleft (min-width: 560px) {
	.wsop-grid {
		grid-template-columns: 40px minmax(0, 1fr) 104px 116px;
		grid-template-areas: "img meta price act";
		gap: 0 10px;
	}
	.wsop-pc { text-align: right; }
	.wsop-pc .wsop-old { display: block; margin: 0; }
	.wsop-listhead {
		position: sticky;
		top: 0;
		z-index: 2;
		display: grid;
		grid-template-columns: 40px minmax(0, 1fr) 104px 116px;
		gap: 0 10px;
		padding: 7px 10px;
		border-bottom: 1px solid #eadfc2;
		background: #f6f1e4;
		color: #7a6a3a;
		font-size: 11.5px;
		font-weight: 700;
		letter-spacing: .03em;
		text-transform: uppercase;
	}
	.wsop-listhead span:first-child { grid-column: 1 / 3; }
	.wsop-listhead span:nth-child(2) { text-align: right; }
	.wsop-listhead span:nth-child(3) { text-align: center; }
	.wsop-act { justify-self: center; }
}
.wsop-overlay .wsop-agent-note {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-left: 4px solid #0b6b24;
	border-radius: 2px;
	background: #e6f4ea;
	color: #0b6b24 !important;
	font-size: 14px;
	font-weight: 700 !important;
	line-height: 1.35;
}
.wsop-overlay .wsop-agent-note.is-agent { color: #0b6b24 !important; }
.wsop-tiers { margin-top: 2px; font-size: 11px; color: #a07a22; }
.wsop-tiers span { display: inline-block; margin-right: 8px; }
.wsop-oos { color: #999; font-size: 12px; white-space: nowrap; }

/* Các phân loại (thu gọn sẵn, bấm tiêu đề để mở) */
.wsop-rows { margin: 0; padding: 0 0 4px; list-style: none; background: #fcfbf7; border-top: 1px solid #f0e8d2; }
.wsop-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "lbl act" "price act";
	gap: 0 10px;
	align-items: center;
	padding: 6px 10px 6px 60px;
	border-top: 1px dashed #eee;
}
.wsop-rows .wsop-row:first-child { border-top: 0; }
.wsop-row > .wsop-lbl { grid-area: lbl; }
.wsop-row > .wsop-pc { grid-area: price; }
.wsop-row > .wsop-act, .wsop-row > .wsop-qty, .wsop-row > .wsop-oos { grid-area: act; }
.wsop-row.is-selected { background: #fff8ec; box-shadow: inset 3px 0 0 #fd7518; }
.wsop-lbl { min-width: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.wsop-lbl small { margin-left: 6px; font-size: 11px; font-weight: 400; color: #999; }
@container wsopleft (min-width: 560px) {
	.wsop-row { grid-template-columns: minmax(0, 1fr) 104px 116px; grid-template-areas: "lbl price act"; }
	.wsop-row > .wsop-act, .wsop-row > .wsop-qty, .wsop-row > .wsop-oos { justify-self: center; }
}

/* Bộ chọn số lượng */
.wsop-qty { display: inline-flex; flex: 0 0 auto; align-items: stretch; border: 1px solid #ccc; border-radius: 2px; background: #fff; }
.wsop-overlay .wsop-qty button {
	width: 30px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	background: #f6f6f6;
	color: #333;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.wsop-overlay .wsop-qty button:hover { background: #ececec; }
.wsop-overlay .wsop-qty input {
	width: 52px;
	height: 32px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font-size: 14px;
	text-align: center;
}
.is-selected .wsop-qty { border-color: #fd7518; }
.is-selected .wsop-qty input { font-weight: 700; color: #fd7518; }

.wsop-overlay .wsop-more {
	margin: 8px 0 0;
	padding: 7px 10px;
	border: 1px solid #c69a39;
	border-radius: 2px;
	background: #fff;
	color: #a07a22;
	cursor: pointer;
}
.wsop-overlay .wsop-more:hover { background: #fffaf0; }

.wsop-selected { margin-top: 8px; border: 1px solid #f0dcb0; border-radius: 2px; background: #fffdf7; }
.wsop-selected-title { padding: 6px 10px; border-bottom: 1px solid #f0dcb0; font-weight: 700; }
.wsop-lines { margin: 0; padding: 0; max-height: 128px; overflow-y: auto; list-style: none; }
.wsop-lines li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto 22px;
	gap: 8px;
	align-items: center;
	padding: 4px 10px;
	border-bottom: 1px solid #f6ecd2;
	font-size: 12px;
}
.wsop-lines li:last-child { border-bottom: 0; }
.wsop-lines em { color: #777; font-style: normal; }
.wsop-ln-qty { color: #777; white-space: nowrap; }
.wsop-ln-sum { white-space: nowrap; }
.wsop-overlay .wsop-rm {
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #999;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.wsop-overlay .wsop-rm:hover { background: #f3e3e3; color: #d33; }

.wsop-note { margin-top: 8px; font-size: 13px; }
.wsop-note p { margin: 0 0 6px; }

/* ---------- Cột phải (form người mua) ---------- */
.wsop-right { flex: 1 1 42%; min-width: 0; padding: 12px; overflow-y: auto; }
.wsop-form { margin: 0; }

.popup-customer-info-title { margin-bottom: 15px; font-size: 16px; font-weight: 700; color: #333; }
.popup-customer-info-title.wsop-sub-title { margin-bottom: 5px; font-size: 13px; }
.popup-customer-info-group { width: 100%; margin-bottom: 6px; }
.popup-customer-info-group:after { content: " "; display: block; clear: both; }
.popup-customer-info-item-1 { overflow: hidden; }
.popup-customer-info-item-2 { float: left; width: 50%; }
.popup-customer-info-item-2:first-child { padding-right: 3px; }
.popup-customer-info-item-2:last-child { padding-left: 3px; }
.popup-customer-info-item-3 { float: left; width: 33.333%; padding-right: 2px; }
.popup-customer-info-item-3:last-child { padding-right: 0; }

.wsop-overlay .popup-customer-info-group input[type="text"],
.wsop-overlay .popup-customer-info-group input[type="tel"],
.wsop-overlay .popup-customer-info-group select,
.wsop-overlay .popup-customer-info-group textarea {
	display: block;
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 4px 8px;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
}
.wsop-overlay .popup-customer-info-group textarea { height: 52px; min-height: 0; resize: vertical; }
.wsop-overlay .popup-customer-info-group .error { border-color: red; }

.popup-customer-info-radio label { position: relative; display: inline-block; margin: 0; font-weight: 400; cursor: pointer; }
.popup-customer-info-radio label ~ label { margin-left: 20px; }
.popup-customer-info-radio label input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.popup-customer-info-radio label span { display: block; padding-left: 23px; }
.popup-customer-info-radio label span:before,
.popup-customer-info-radio label span:after {
	content: "";
	position: absolute;
	top: 1px;
	left: 0;
	width: 16px;
	height: 16px;
	border: 1px solid #a6a6a6;
	border-radius: 50%;
}
.popup-customer-info-radio label input:checked ~ span:before { border-color: #fd7518; }
.popup-customer-info-radio label input:checked ~ span:after { top: 5px; left: 4px; width: 8px; height: 8px; border-color: #fd7518; background: #fd7518; }
.popup-customer-info-radio label input:focus-visible ~ span:before { box-shadow: 0 0 0 2px rgba(253, 117, 24, .35); }
.popup-customer-info-radio.wsop-payments label { display: block; margin: 0 0 10px; }
.popup-customer-info-radio.wsop-payments label ~ label { margin-left: 0; }

.wsop-coupon { display: flex; gap: 8px; }
.wsop-overlay .wsop-coupon input { flex: 1 1 auto; }
.wsop-overlay .wsop-coupon button {
	flex: 0 0 auto;
	height: 32px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #c69a39;
	border-radius: 0;
	background: #c69a39;
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
	cursor: pointer;
}
.wsop-coupon-msg { margin: -2px 0 8px; font-size: 12px; }
.wsop-coupon-msg.is-ok { color: #2a9d3a; }
.wsop-coupon-msg.is-error { color: red; }

.wsop-totals { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; }
.wsop-trow { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.wsop-trow b { font-weight: 700; }
.wsop-trow-total b { font-size: 18px; color: #e03232; }
.wsop-hint { min-height: 0; margin-top: 4px; font-size: 12px; color: #d33; }

.wsop-overlay .wsop-order-btn {
	position: relative;
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 2px;
	background: #c69a39;
	color: #fff;
	font-size: 16px;
	text-transform: uppercase;
	cursor: pointer;
}
.wsop-overlay .wsop-order-btn:hover { background: #b88b2b; }
.wsop-overlay .wsop-order-btn.loading { color: transparent; pointer-events: none; }
.wsop-overlay .wsop-order-btn.loading:after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-right-color: transparent;
	border-radius: 50%;
	animation: wsop-spin .5s infinite linear;
}
@keyframes wsop-spin { to { transform: rotate(360deg); } }

.wsop-msg { font-size: 13px; color: #333; }
.wsop-msg.is-error { color: red; }

/* Honeypot: ẩn khỏi người dùng thật */
.wsop-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
	.wsop-overlay { padding: 0; align-items: stretch; }
	.wsop-dialog { height: 100%; max-width: none; border-radius: 0; }
	.wsop-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
	.wsop-cols { display: block; flex: none; }
	.wsop-left { border-right: 0; border-bottom: 6px solid #f3f3f3; }
	.wsop-list { flex: none; max-height: 52vh; }
	.wsop-right { overflow: visible; }
	.wsop-overlay .wsop-toolbar input { flex: 0 0 106px; font-size: 12px; }
	.wsop-overlay .wsop-toolbar select { padding: 4px 20px 4px 8px; background-position: right 7px center; font-size: 11px; text-overflow: ellipsis; }
	.wsop-overlay .popup-customer-info-group input[type="text"],
	.wsop-overlay .popup-customer-info-group input[type="tel"],
	.wsop-overlay .popup-customer-info-group select,
	.wsop-overlay .popup-customer-info-group textarea { font-size: 16px; } /* tránh iOS tự phóng to */
}

@media (prefers-reduced-motion: reduce) {
	.wsop-overlay .wsop-close { transition: none; }
}

/* ---------- Màn hình sau khi đặt hàng ---------- */
.wsop-overlay .wsop-success { padding: 16px 22px 18px; overflow-y: auto; }

/* Khung thông báo thành công. Trung hòa kiểu .success / .message của theme (hay tô nền xanh đè lên chữ). */
.wsop-overlay .wsop-done {
	margin: 0 0 14px;
	padding: 10px 16px;
	border: 1px solid #cfe8d6;
	border-left: 4px solid #1f9d3a;
	border-radius: 4px;
	background: #f1faf4;
	color: #333;
	text-align: center;
}
.wsop-overlay .wsop-done *,
.wsop-overlay .wsop-done .success { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.wsop-overlay .wsop-done .success { padding: 0 !important; margin: 0 !important; color: inherit; }
.wsop-overlay .wsop-done p { margin: 0 0 3px !important; padding: 0 !important; line-height: 1.4; }
.wsop-overlay .wsop-done p:last-child { margin-bottom: 0; }
.wsop-overlay .wsop-done p:first-child { font-size: 20px !important; font-weight: 700; color: #1f9d3a !important; }

/* ---------- Thông tin thanh toán: QR bên trái, thông tin bên phải ---------- */
.wsop-overlay .wsop-pay {
	display: grid;
	grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
	padding: 16px;
	border: 1px solid #ecd9a8;
	border-radius: 6px;
	background: #fffdf8;
	color: #333;
}
.wsop-overlay .wsop-pay-qrbox { text-align: center; }
.wsop-overlay .wsop-pay img.wsop-pay-qr {
	display: block !important;
	width: 100% !important;
	max-width: 280px !important;
	height: auto !important;
	margin: 0 auto !important;
	border: 1px solid #e4e4e4;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.wsop-overlay .wsop-pay-cap { margin-top: 8px; font-size: 12px; color: #777; }

.wsop-overlay .wsop-pay-main { min-width: 0; }
.wsop-overlay .wsop-pay-msg { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.wsop-overlay .wsop-pay-msg p { margin: 0 0 6px; }

.wsop-overlay .wsop-pay-info { margin: 0; padding: 0; border: 1px solid #f0e2bc; border-radius: 4px; background: #fff; }
.wsop-overlay .wsop-pay-info > div { padding: 7px 12px; border-bottom: 1px solid #f4ead0; }
.wsop-overlay .wsop-pay-info > div:last-child { border-bottom: 0; }
.wsop-overlay .wsop-pay-info dt { margin: 0; padding: 0; font-size: 12px; font-weight: 400; color: #8a8a8a; }
.wsop-overlay .wsop-pay-info dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 1px 0 0; padding: 0; font-size: 15px; font-weight: 700; color: #222; }
.wsop-overlay .wsop-pay-info dd span { min-width: 0; overflow-wrap: anywhere; }
.wsop-overlay .wsop-pay-info .is-amount dd { font-size: 19px; color: #e00000; }
.wsop-overlay .wsop-copy { flex: 0 0 auto; margin: 0; padding: 4px 10px; border: 1px solid #c69a39; border-radius: 3px; background: #fff; color: #a07a22; font-size: 12px; font-weight: 400; line-height: 1.2; cursor: pointer; }
.wsop-overlay .wsop-copy:hover { background: #c69a39; color: #fff; }

.wsop-overlay .wsop-pay .wsop-pay-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 4px; background: #fff1f1; color: #e00000; font-size: 14px; font-weight: 700; line-height: 1.45; }

.wsop-overlay .wsop-done-actions { margin-top: 12px; text-align: center; }
.wsop-overlay .wsop-done-close { min-width: 140px; margin: 0; padding: 7px 22px; border: 1px solid #c69a39; border-radius: 3px; background: #fff; color: #a07a22; font-size: 14px; cursor: pointer; }
.wsop-overlay .wsop-done-close:hover { background: #c69a39; color: #fff; }

@media (max-width: 860px) {
	.wsop-overlay .wsop-success { padding: 14px; }
	.wsop-overlay .wsop-pay { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
	.wsop-overlay .wsop-pay img.wsop-pay-qr { max-width: 260px !important; }
}

/* ---------- Chế độ nhúng sẵn trong trang ([wsop_inline]) ---------- */
.wsop-overlay.is-inline { position: static; z-index: auto; display: block; padding: 0; background: none; }
.wsop-overlay.is-inline .wsop-dialog { max-width: none; height: auto; border: 1px solid #e3d6b0; box-shadow: 0 1px 8px rgba(0, 0, 0, .12); }
.wsop-overlay.is-inline .wsop-close,
.wsop-overlay.is-inline .wsop-done-actions { display: none !important; }
.wsop-overlay.is-inline .wsop-list { flex: none; height: 460px; }
@media (max-width: 860px) {
	.wsop-overlay.is-inline .wsop-dialog { height: auto; }
	.wsop-overlay.is-inline .wsop-body { overflow: visible; }
	.wsop-overlay.is-inline .wsop-list { height: auto; max-height: 52vh; }
}

/* Màn hình rất hẹp: ô tìm kiếm và nút danh mục xếp thành 2 hàng để chữ không bị cắt */
@media (max-width: 345px) {
	.wsop-toolbar { flex-wrap: wrap; }
	.wsop-overlay .wsop-toolbar input { flex: 1 1 100%; }
	.wsop-overlay .wsop-toolbar select { flex: 1 1 100%; }
}

/* ---------- Danh sách gọn: lời nhắc khi chưa chọn danh mục ---------- */
.wsop-prompt { padding: 30px 24px; color: #6b6b6b; font-size: 14px; line-height: 1.55; text-align: center; }
.wsop-prompt p { margin: 0; }
.wsop-overlay .wsop-prompt-ico {
	display: block;
	width: 52px;
	height: 52px;
	margin: 0 auto 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #e6f4ea url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 22 22' fill='none' stroke='%231f9d3a' stroke-width='2'><rect x='3' y='3' width='6.5' height='6.5' rx='1'/><rect x='12.5' y='3' width='6.5' height='6.5' rx='1'/><rect x='3' y='12.5' width='6.5' height='6.5' rx='1'/><rect x='12.5' y='12.5' width='6.5' height='6.5' rx='1'/></svg>") center no-repeat;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.wsop-overlay .wsop-prompt-ico:hover { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(31, 157, 58, .18); }
.wsop-overlay .wsop-prompt-ico:focus-visible { outline: 2px solid #1f9d3a; outline-offset: 2px; }

/* Nhấp nháy ô chọn danh mục khi trình duyệt không mở được danh sách */
.wsop-overlay .wsop-toolbar select.is-pulse { animation: wsop-pulse 1.4s ease; }
@keyframes wsop-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 157, 58, 0); } 30% { box-shadow: 0 0 0 6px rgba(31, 157, 58, .35); } }
.wsop-prompt.is-compact { padding: 14px 16px; border-top: 1px dashed #e0e0e0; background: #fafafa; font-size: 13px; }
.wsop-list.is-idle { flex: 0 0 auto; min-height: 0; height: auto; }
.wsop-overlay.is-inline .wsop-list.is-idle { height: auto; }

/* ---------- Khung danh sách cao vừa N sản phẩm (--wsop-rows), phần còn lại cuộn ---------- */
.wsop-overlay .wsop-list:not(.is-idle) {
	flex: 0 0 auto;
	min-height: 0;
	max-height: none;
	height: calc(var(--wsop-rows, 2) * 72px + 28px); /* bố cục xếp chồng: giá nằm dưới tên + một phần hàng kế tiếp để gợi ý còn nữa */
	transition: height .2s ease;
	overscroll-behavior: contain;
}
/* Khi khách mở một sản phẩm nhiều phân loại thì khung giãn ra cho dễ chọn */
.wsop-overlay .wsop-list:not(.is-idle):has(.wsop-prod.is-open) { height: calc(max(var(--wsop-rows, 2), 6) * 72px + 28px); }

/* Khung rộng (dạng bảng): có thêm hàng tiêu đề cột */
@container wsopleft (min-width: 560px) {
	.wsop-overlay .wsop-list:not(.is-idle) { height: calc(34px + var(--wsop-rows, 2) * 58px + 28px); }
	.wsop-overlay .wsop-list:not(.is-idle):has(.wsop-prod.is-open) { height: calc(34px + max(var(--wsop-rows, 2), 6) * 58px + 28px); }
}

/* Khung hẹp: ô tìm kiếm ngắn lại, chữ nút danh mục nhỏ lại để không bị cắt */
@container wsopleft (max-width: 460px) {
	.wsop-overlay .wsop-toolbar input { flex: 0 0 106px; font-size: 12px; }
	.wsop-overlay .wsop-toolbar select { padding: 4px 20px 4px 8px; background-position: right 7px center; font-size: 11px; text-overflow: ellipsis; }
}

/* Cột trái trên máy tính: mục "Đã chọn" tận dụng phần chiều cao còn lại */
@media (min-width: 861px) {
	.wsop-overlay:not(.is-inline) .wsop-selected { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
	.wsop-overlay:not(.is-inline) .wsop-lines { flex: 1 1 auto; max-height: none; min-height: 0; }
}

/* Popup hẹp (ví dụ nhúng trong cột nhỏ của trang): cột trái/phải tự xếp chồng, không bị ép cạnh nhau */
@container wsopbody (max-width: 600px) {
	.wsop-cols { display: block; flex: none; }
	.wsop-left { border-right: 0; border-bottom: 6px solid #f3f3f3; }
	.wsop-right { overflow: visible; }
}
