/* Beta Gen Widgets - Foundry / Process Table */
.bgw-foundry-table {
	--bgw-border: #e5e7eb;
	--bgw-text: #2d2d2d;
	--bgw-muted: #70757d;
	--bgw-header-bg: #f7f8f9;
	--bgw-input-bg: #fff;
	--bgw-link: #b74b4b;
	--bgw-success: #198754;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--bgw-border);
	background: #fff;
	color: var(--bgw-text);
}

.bgw-foundry-table *,
.bgw-foundry-table *::before,
.bgw-foundry-table *::after {
	box-sizing: border-box;
}

.bgw-toolbar {
	width: 100%;
}

.bgw-filters {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding: 14px 12px;
	border-bottom: 1px solid var(--bgw-border);
	background: #fff;
}

.bgw-filter-item {
	min-width: 0;
}

.bgw-filter-label {
	display: block;
	margin: 0 0 7px;
	font-size: 8px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--bgw-muted);
}

.bgw-filter-control {
	display: block;
	width: 100%;
	min-width: 0;
	height: 36px;
	padding: 0 11px;
	border: 1px solid var(--bgw-border);
	border-radius: 0;
	background: var(--bgw-input-bg);
	color: var(--bgw-text);
	font-size: 11px;
	line-height: 36px;
	outline: none;
	box-shadow: none;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

select.bgw-filter-control {
	padding-right: 28px;
	cursor: pointer;
}

.bgw-filter-control:focus {
	border-color: #a9afb6;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, .04);
}

.bgw-filter-control::placeholder {
	color: #a1a5aa;
	opacity: 1;
}

.bgw-search-wrap {
	position: relative;
}

.bgw-search-wrap .bgw-search-input {
	padding-left: 30px;
}

.bgw-search-icon {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 11px;
	width: 10px;
	height: 10px;
	border: 1px solid #8c9298;
	border-radius: 50%;
	transform: translateY(-55%);
	pointer-events: none;
}

.bgw-search-icon::after {
	content: "";
	position: absolute;
	width: 5px;
	height: 1px;
	right: -4px;
	bottom: -2px;
	background: #8c9298;
	transform: rotate(45deg);
	transform-origin: left center;
}

.bgw-entry-count {
	padding: 10px 12px 11px;
	font-size: 10px;
	line-height: 1.4;
	color: var(--bgw-muted);
}

.bgw-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.bgw-table {
	width: 100%;
	min-width: 760px;
	margin: 0;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	font-size: 11px;
}

.bgw-table th,
.bgw-table td {
	border-right: 1px solid var(--bgw-border);
	border-bottom: 1px solid var(--bgw-border);
	text-align: left;
	vertical-align: middle;
}

.bgw-table th:last-child,
.bgw-table td:last-child {
	border-right: 0;
}

.bgw-table thead th {
	padding: 9px 10px;
	background: var(--bgw-header-bg);
	color: #3e4247;
	font-size: 8px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.bgw-table tbody td {
	padding: 10px;
	background: #fff;
	color: var(--bgw-text);
	font-size: 10px;
	line-height: 1.4;
}

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

.bgw-table tbody tr:hover td {
	background: #fbfbfb;
}

.bgw-product-link {
	color: var(--bgw-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color .2s ease;
}

.bgw-product-link:hover {
	color: #8e3030;
}

.bgw-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #444;
	white-space: nowrap;
}

.bgw-status-dot {
	display: inline-block;
	flex: 0 0 5px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #6c757d;
}

.bgw-status.available .bgw-status-dot {
	background: var(--bgw-success);
}

.bgw-status.unavailable .bgw-status-dot {
	background: #dc3545;
}

.bgw-status.custom .bgw-status-dot {
	background: #6c757d;
}

.bgw-no-results {
	padding: 28px 16px;
	text-align: center;
	color: var(--bgw-muted);
}

.bgw-no-results-row td {
	border-bottom: 0 !important;
}

.bgw-loading {
	position: absolute;
	z-index: 10;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	background: rgba(255, 255, 255, .72);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, visibility .18s ease;
}

.bgw-foundry-table.is-loading .bgw-loading {
	opacity: 1;
	visibility: visible;
}

.bgw-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(0, 0, 0, .12);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: bgw-spin .7s linear infinite;
}

.bgw-loading-text {
	font-size: 11px;
	color: #5f6368;
}

@keyframes bgw-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.bgw-filters {
		grid-template-columns: 1fr;
	}

	.bgw-table {
		min-width: 680px;
	}

	.bgw-table thead th,
	.bgw-table tbody td {
		padding: 9px 8px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.bgw-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
