/* BCPSEA OHS Resources & Tools table  [bcpsea_ohs_resources] */

.bcpsea-ohs-table-wrap {
	margin: 0 0 2rem;
}

/* Controls (search + category filter) */

.bcpsea-ohs-table-wrap .ohs-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 18px;
}

.bcpsea-ohs-table-wrap .ohs-search {
	flex: 1 1 260px;
	min-width: 200px;
	border: 1px solid #1996e6;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 16px;
	height: auto;
	line-height: 1.4;
}

.bcpsea-ohs-table-wrap .ohs-search::placeholder {
	font-size: 16px;
}

/* Category dropdown: fully restyled because Avada strips the native
   appearance/arrow and forces a fixed height on bare selects. */
.bcpsea-ohs-table-wrap .ohs-category-filter {
	flex: 0 1 auto;
	width: auto;
	min-width: 240px;
	max-width: 100%;
	height: auto;
	line-height: 1.4;
	text-indent: 0;
	border: 1px solid #1996e6;
	border-radius: 4px;
	padding: 10px 44px 10px 14px;
	font-size: 16px;
	color: inherit;
	background-color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230075c1' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
}

/* Table (desktop) */

.bcpsea-ohs-table-wrap .ohs-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.bcpsea-ohs-table-wrap .ohs-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

.bcpsea-ohs-table-wrap .ohs-table thead {
	background-color: var(--primary_color, #0075c1);
	border: 1px solid var(--primary_color, #0075c1);
	text-align: left;
}

.bcpsea-ohs-table-wrap .ohs-table th {
	padding: 14px 10px;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	vertical-align: middle;
}

.bcpsea-ohs-table-wrap .ohs-table th:hover {
	background-color: rgba(255, 255, 255, 0.12);
}

.bcpsea-ohs-table-wrap .ohs-table th[aria-sort="ascending"] .ohs-th-label::after {
	content: " \25B2";
	font-size: 0.75em;
}

.bcpsea-ohs-table-wrap .ohs-table th[aria-sort="descending"] .ohs-th-label::after {
	content: " \25BC";
	font-size: 0.75em;
}

.bcpsea-ohs-table-wrap .ohs-table td {
	border-bottom: 1px solid #dcdcdc;
	padding: 12px 10px;
	vertical-align: top;
}

.bcpsea-ohs-table-wrap .ohs-cell-title {
	min-width: 150px;
	font-weight: 600;
}

.bcpsea-ohs-table-wrap .ohs-cell-desc {
	min-width: 220px;
}

.bcpsea-ohs-table-wrap .ohs-cell-type {
	min-width: 80px;
}

.bcpsea-ohs-table-wrap .ohs-cell-cat {
	min-width: 100px;
}

.bcpsea-ohs-table-wrap .ohs-cell-date {
	min-width: 90px;
}

.bcpsea-ohs-table-wrap .ohs-cell-file {
	text-align: center;
}

/* File links */

.bcpsea-ohs-table-wrap .ohs-file {
	display: inline-block;
	color: #1996e6;
	font-size: 28px;
	line-height: 1;
	text-decoration: none;
}

.bcpsea-ohs-table-wrap .ohs-file:hover,
.bcpsea-ohs-table-wrap .ohs-file:focus {
	color: #0e285c;
}

.bcpsea-ohs-table-wrap .ohs-file-label {
	display: none;
}

.bcpsea-ohs-table-wrap .ohs-na {
	color: #8a8f98;
	font-size: 13px;
}

.bcpsea-ohs-table-wrap .ohs-no-results {
	margin: 18px 0 0;
	font-style: italic;
}

/* Mobile: stacked cards */

@media (max-width: 800px) {
	.bcpsea-ohs-table-wrap .ohs-search,
	.bcpsea-ohs-table-wrap .ohs-category-filter {
		flex: 1 1 100%;
		width: 100%;
	}

	.bcpsea-ohs-table-wrap .ohs-table-scroll {
		overflow-x: visible;
	}

	.bcpsea-ohs-table-wrap .ohs-table,
	.bcpsea-ohs-table-wrap .ohs-table tbody,
	.bcpsea-ohs-table-wrap .ohs-table tr,
	.bcpsea-ohs-table-wrap .ohs-table td {
		display: block;
	}

	.bcpsea-ohs-table-wrap .ohs-table thead {
		display: none;
	}

	.bcpsea-ohs-table-wrap .ohs-table tr {
		border: 1px solid #dcdcdc;
		border-radius: 8px;
		padding: 16px;
		margin: 0 0 16px;
	}

	.bcpsea-ohs-table-wrap .ohs-table td {
		border: none;
		padding: 0 0 8px;
		min-width: 0;
		text-align: left;
	}

	.bcpsea-ohs-table-wrap .ohs-cell-title {
		font-size: 17px;
		font-weight: 700;
	}

	.bcpsea-ohs-table-wrap .ohs-cell-type,
	.bcpsea-ohs-table-wrap .ohs-cell-cat,
	.bcpsea-ohs-table-wrap .ohs-cell-date {
		display: inline-block;
		padding: 0 12px 8px 0;
		font-size: 13px;
		color: #555;
	}

	.bcpsea-ohs-table-wrap .ohs-cell-type::before,
	.bcpsea-ohs-table-wrap .ohs-cell-cat::before,
	.bcpsea-ohs-table-wrap .ohs-cell-date::before {
		content: attr(data-label) ": ";
		font-weight: 600;
	}

	/* Download buttons */

	.bcpsea-ohs-table-wrap .ohs-cell-file {
		display: inline-block;
		padding: 8px 8px 0 0;
	}

	.bcpsea-ohs-table-wrap .ohs-cell-file .ohs-file {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		background-color: var(--primary_color, #0075c1);
		color: #fff;
		font-size: 14px;
		font-weight: 600;
		padding: 10px 16px;
		border-radius: 6px;
	}

	.bcpsea-ohs-table-wrap .ohs-cell-file .ohs-file:hover,
	.bcpsea-ohs-table-wrap .ohs-cell-file .ohs-file:focus {
		background-color: #005a96;
		color: #fff;
	}

	.bcpsea-ohs-table-wrap .ohs-cell-file .ohs-file i {
		font-size: 16px;
	}

	.bcpsea-ohs-table-wrap .ohs-file-label {
		display: inline;
	}

	/* Hide empty "Not Available" slots on mobile to reduce noise */
	.bcpsea-ohs-table-wrap td.ohs-cell-file:has(> .ohs-na) {
		display: none;
	}
}
