/* ── Quay Thử XS Pro — Stylesheet v2.0 ────────────────────────── */

.xsqt-wrap {
	max-width: 720px;
	margin: 0 auto;
	font-family: inherit;
	font-size: 14px;
	color: #222;
}

/* ── Tabs ──────────────────────────────────────────────────────── */
.xsqt-tabs {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.xsqt-tab {
	padding: 6px 14px;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	background: #f0f0f0;
	font-size: 13px;
	font-weight: 500;
	transition: background .18s, color .18s;
}

.xsqt-tab:hover,
.xsqt-tab.active {
	background: #d32f2f;
	color: #fff;
}

/* ── Controls ──────────────────────────────────────────────────── */
.xsqt-controls {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.xsqt-field label {
	display: block;
	font-size: 11px;
	color: #888;
	margin-bottom: 3px;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.xsqt-field select {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	min-width: 130px;
	background: #fff;
	cursor: pointer;
}

.xsqt-field select:focus {
	outline: none;
	border-color: #d32f2f;
}

.xsqt-btn {
	padding: 7px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background .18s, opacity .18s;
}

.xsqt-btn-quay {
	background: #d32f2f;
	color: #fff;
}

.xsqt-btn-quay:hover:not(:disabled) {
	background: #b71c1c;
}

.xsqt-btn-reset {
	background: #757575;
	color: #fff;
}

.xsqt-btn-reset:hover:not(:disabled) {
	background: #4a4a4a;
}

.xsqt-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

/* ── Bảng kết quả ──────────────────────────────────────────────── */
.xsqt-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 14px;
	table-layout: auto;
}

.xsqt-table th,
.xsqt-table td {
	border: 1px solid #ddd;
	padding: 5px 8px;
	text-align: center;
	vertical-align: middle;
}

.xsqt-table thead tr th {
	background: #d32f2f;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
}

.xsqt-table tbody th {
	background: #fef5f5;
	color: #c62828;
	font-weight: 700;
	white-space: nowrap;
	font-size: 13px;
}

.xsqt-table tbody tr:nth-child(even) td {
	background: #fafafa;
}

/* MB: số xếp ngang trong 1 ô td */
.xsqt-wrap.is-mb .xsqt-num {
	display: inline-block;
	margin: 2px 5px;
	font-weight: 600;
	min-width: 42px;
	font-size: 14px;
}

/* MT/MN: mỗi td là một số */
.xsqt-wrap.is-mtmn .xsqt-num {
	font-weight: 600;
	font-size: 14px;
}

/* ── Panel filter & highlight ──────────────────────────────────── */
.xsqt-panel {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	padding: 10px 0;
	margin-bottom: 14px;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
}

.xsqt-filter {
	display: flex;
	gap: 14px;
}

.xsqt-filter label {
	font-size: 13px;
	cursor: pointer;
	user-select: none;
}

.xsqt-digits {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
}

.xsqt-digit {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e0e0e0;
	text-align: center;
	line-height: 28px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	transition: background .15s, color .15s;
	user-select: none;
}

.xsqt-digit:hover {
	background: #ef9a9a;
}

.xsqt-digit.active {
	background: #d32f2f;
	color: #fff;
}

/* ── Bảng đầu đuôi ────────────────────────────────────────────── */
.xsqt-dauduoi {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 4px;
}

.xsqt-dd-tbl {
	flex: 1;
	min-width: 130px;
	border-collapse: collapse;
	font-size: 13px;
}

.xsqt-dd-tbl th,
.xsqt-dd-tbl td {
	border: 1px solid #e0e0e0;
	padding: 4px 8px;
	text-align: center;
	vertical-align: middle;
}

.xsqt-dd-tbl thead th {
	background: #d32f2f;
	color: #fff;
	font-weight: 600;
}

.xsqt-dd-tbl tbody td:first-child {
	background: #fef5f5;
	font-weight: 700;
	color: #c62828;
	width: 28px;
}

.xsqt-dd-tbl tbody td:last-child {
	text-align: left;
	padding-left: 10px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.xsqt-controls {
		gap: 8px;
	}
	.xsqt-table th,
	.xsqt-table td {
		padding: 4px 5px;
		font-size: 12px;
	}
	.xsqt-wrap.is-mb .xsqt-num {
		margin: 1px 3px;
		min-width: 34px;
		font-size: 12px;
	}
}
