/*!
 * SaaS Experience Bridge — Section: table, insight, gate, thanh action
 *
 * Một phần của giao diện Experience. Thứ tự nạp do public/ui/manifest.php quy
 * định và là RÀNG BUỘC: nhiều quy tắc dựa vào việc file sau ghi đè file trước
 * ở cùng độ đặc hiệu. Đảo thứ tự là đổi giao diện.
 */

/* --------------------------------------------------------------------------
 * Section: table
 * ----------------------------------------------------------------------- */

.spe-table-wrap {
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--spe-border);
	border-radius: var(--spe-radius-sm);
	max-width: 100%;
	overflow-x: auto;
}

.spe-table {
	border-collapse: collapse;
	font-size: 0.9375rem;
	min-width: 100%;
	width: max-content;
}

.spe-table th,
.spe-table td {
	border-bottom: 1px solid var(--spe-border);
	padding: 0.625rem 0.875rem;
	text-align: left;
}

.spe-table th {
	color: var(--spe-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.spe-table tbody tr:last-child td {
	border-bottom: 0;
}

.spe-table td {
	color: var(--spe-ink);
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
 * Section: insight
 * ----------------------------------------------------------------------- */

.spe-insight {
	background: var(--spe-surface-2);
	border-inline-start: 3px solid var(--spe-muted);
	border-radius: var(--spe-radius-sm);
	color: var(--spe-ink);
	display: flex;
	gap: 0.625rem;
	margin: 0;
	padding: 0.875rem 1rem;
}

.spe-insight__icon {
	flex: none;
	font-weight: 700;
}

.spe-insight > span:last-child {
	min-width: 0;
	overflow-wrap: anywhere;
}

.spe-insight--good {
	border-inline-start-color: var(--spe-good);
}

.spe-insight--warning {
	background: var(--spe-warning-soft);
	border-inline-start-color: var(--spe-warning);
}

.spe-insight--critical {
	border-inline-start-color: var(--spe-critical);
}

.spe-insight--info {
	background: var(--spe-accent-soft);
	border-inline-start-color: var(--spe-accent-strong);
}

/* --------------------------------------------------------------------------
 * Gate: section bị khoá
 * ----------------------------------------------------------------------- */

.spe-locked {
	border: 1px dashed var(--spe-border-strong);
	border-radius: var(--spe-radius-sm);
	overflow: hidden;
	position: relative;
}

/*
 * Cũng là một `filter` được phép: lớp phủ Gate bọc cả một section và có nhiều
 * lắm là một hai cái trên màn hình — không nhân theo số dòng. Xem
 * .spe-locked-cell__mask trong 09-lock.css.
 */
.spe-locked__content {
	filter: blur(5px);
	opacity: 0.5;
	padding: 1rem;
	pointer-events: none;
	user-select: none;
}

.spe-locked__overlay {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	inset: 0;
	justify-content: center;
	padding: 1rem;
	position: absolute;
	text-align: center;
}

.spe-locked__label {
	align-items: center;
	color: var(--spe-ink);
	display: inline-flex;
	font-size: 0.9375rem;
	font-weight: 600;
	gap: 0.375rem;
}

.spe-locked__label svg {
	height: 16px;
	width: 16px;
}

.spe-actions {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 1rem;
}

.spe-actions__note {
	color: var(--spe-muted);
	font-size: 0.875rem;
	margin: 0;
	max-width: 46ch;
	text-align: center;
	text-wrap: pretty;
}

/*
 * Câu giải thích vì sao nút đang mờ. Nó thay chỗ câu mời gọi, nên phải nhạt
 * hơn — đây là thông tin trạng thái, không phải lời chào hàng.
 */
.spe-actions__note--waiting {
	align-items: center;
	color: var(--spe-ink-2);
	display: flex;
	gap: 0.4rem;
}

.spe-actions__note--waiting::before {
	animation: spe-pulse 1.4s ease-in-out infinite;
	background: var(--spe-accent-strong);
	border-radius: 50%;
	content: "";
	flex: none;
	height: 6px;
	width: 6px;
}

@keyframes spe-pulse {
	50% {
		opacity: 0.25;
	}
}

