/**
 * Resource Bundle product page — additions on top of product-page.css
 * (the bundle page reuses the document page's layout, gallery, info,
 * purchase card, tabs, Key Benefits and related grid as-is). Only the
 * bundle-specific "What's Included" table and Document List live here.
 * Existing QEHS tokens only.
 */

.qehs-bundle-page__content [hidden] {
	display: none !important;
}

/* ---------------- What's Included ---------------- */

.qehs-bundle-page__included {
	min-width: 0;
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-lg);
	overflow: hidden;
}

.qehs-bundle-page__included-table {
	width: 100%;
	border-collapse: collapse;
}

.qehs-bundle-page__included-table th,
.qehs-bundle-page__included-table td {
	padding: var(--qehs-space-md) var(--qehs-space-lg);
	text-align: left;
	border-bottom: 1px solid var(--qehs-border);
}

.qehs-bundle-page__included-table th:last-child,
.qehs-bundle-page__included-table td:last-child {
	text-align: right;
	white-space: nowrap;
}

.qehs-bundle-page__included-table thead th {
	background-color: var(--qehs-background-alt);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--qehs-text);
}

.qehs-bundle-page__included-table tbody td:first-child {
	display: flex;
	align-items: center;
	gap: var(--qehs-space-md);
	font-weight: 600;
}

.qehs-bundle-page__included-table tbody a {
	color: var(--qehs-text);
	text-decoration: none;
}

.qehs-bundle-page__included-table tbody a:hover,
.qehs-bundle-page__included-table tbody a:focus-visible {
	color: var(--qehs-secondary);
	text-decoration: underline;
}

/* Each category opens All Documents filtered to this standard + category:
   the link is stretched over its whole row (easy click/tap target), with
   a light row highlight and the same green/underline on hover/focus.
   Unchanged at rest. */
.qehs-bundle-page__included-table tbody tr {
	position: relative;
	transition: background-color 0.15s ease;
}

.qehs-bundle-page__included-table tbody a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.qehs-bundle-page__included-table tbody tr:hover {
	background-color: var(--qehs-background-alt);
}

.qehs-bundle-page__included-table tbody tr:hover a {
	color: var(--qehs-secondary);
	text-decoration: underline;
}

.qehs-bundle-page__included-table tbody a:focus-visible {
	outline: none;
}

.qehs-bundle-page__included-table tbody tr:focus-within {
	outline: 2px solid var(--qehs-secondary);
	outline-offset: -2px;
}

.qehs-bundle-page__included-table tfoot th,
.qehs-bundle-page__included-table tfoot td {
	border-bottom: none;
	font-weight: 700;
}

.qehs-bundle-page__type-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-background-alt);
	color: var(--qehs-primary);
}

.qehs-bundle-page__count {
	display: inline-block;
	min-width: 36px;
	padding: 3px 10px;
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-success-tint);
	color: var(--qehs-success);
	font-weight: 700;
	text-align: center;
}

.qehs-bundle-page__count--total {
	background-color: var(--qehs-secondary);
	color: #FFFFFF;
}

/* ---------------- Document List ---------------- */

.qehs-bundle-page__documents {
	min-width: 0;
}

.qehs-bundle-page__documents[aria-busy="true"] .qehs-bundle-page__table-wrap {
	opacity: 0.55;
	transition: opacity 0.15s ease;
}

.qehs-bundle-page__toolbar {
	display: flex;
	gap: var(--qehs-space-sm);
	margin-bottom: var(--qehs-space-md);
}

.qehs-bundle-page__search {
	display: flex;
	flex: 1;
	align-items: center;
	gap: var(--qehs-space-sm);
	min-width: 0;
	padding-inline: var(--qehs-space-md);
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-md);
	color: var(--qehs-text-muted);
}

.qehs-bundle-page__search:focus-within {
	border-color: var(--qehs-secondary);
}

.qehs-bundle-page__search input {
	flex: 1;
	min-width: 0;
	height: 44px;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--qehs-text);
}

.qehs-bundle-page__search input:focus {
	outline: none;
}

.qehs-bundle-page__search-btn {
	flex-shrink: 0;
	min-height: 46px;
	padding: 0 var(--qehs-space-lg);
	border: none;
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-secondary);
	color: #FFFFFF;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}

.qehs-bundle-page__search-btn:hover,
.qehs-bundle-page__search-btn:focus-visible {
	background-color: var(--qehs-success);
}

.qehs-bundle-page__filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--qehs-space-sm);
	margin-bottom: var(--qehs-space-md);
}

.qehs-bundle-page__filter {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--qehs-border);
	border-radius: 999px;
	color: var(--qehs-text);
	font-size: 0.875rem;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.qehs-bundle-page__filter span {
	color: var(--qehs-text-muted);
}

.qehs-bundle-page__filter:hover,
.qehs-bundle-page__filter:focus-visible {
	border-color: var(--qehs-secondary);
}

.qehs-bundle-page__filter.is-active {
	border-color: var(--qehs-secondary);
	background-color: var(--qehs-secondary);
	color: #FFFFFF;
}

.qehs-bundle-page__filter.is-active span {
	color: rgba(255, 255, 255, 0.85);
}

.qehs-bundle-page__result-count {
	margin: 0 0 var(--qehs-space-sm);
	font-size: 0.875rem;
	color: var(--qehs-text-muted);
}

.qehs-bundle-page__table-wrap {
	overflow-x: auto;
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-lg);
}

.qehs-bundle-page__doc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.qehs-bundle-page__doc-table th,
.qehs-bundle-page__doc-table td {
	padding: 12px var(--qehs-space-md);
	text-align: left;
	border-bottom: 1px solid var(--qehs-border);
	vertical-align: top;
}

.qehs-bundle-page__doc-table thead th {
	background-color: var(--qehs-background-alt);
	font-weight: 700;
	white-space: nowrap;
}

.qehs-bundle-page__doc-table tbody tr:last-child td {
	border-bottom: none;
}

.qehs-bundle-page__doc-table td:nth-child(2),
.qehs-bundle-page__doc-table td:nth-child(5) {
	white-space: nowrap;
	color: var(--qehs-text-muted);
}

.qehs-bundle-page__doc-table a {
	color: var(--qehs-primary);
	font-weight: 600;
	text-decoration: none;
}

.qehs-bundle-page__doc-table a:hover,
.qehs-bundle-page__doc-table a:focus-visible {
	color: var(--qehs-secondary);
	text-decoration: underline;
}

.qehs-bundle-page__empty {
	margin: 0;
	padding: var(--qehs-space-lg);
	text-align: center;
	color: var(--qehs-text-muted);
}

.qehs-bundle-page__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: var(--qehs-space-md);
}

.qehs-bundle-page__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-background);
	color: var(--qehs-primary);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.qehs-bundle-page__page:hover:not(.is-active),
.qehs-bundle-page__page:focus-visible {
	border-color: var(--qehs-secondary);
	color: var(--qehs-secondary);
}

.qehs-bundle-page__page.is-active {
	border-color: var(--qehs-secondary);
	background-color: var(--qehs-secondary);
	color: #FFFFFF;
}

.qehs-bundle-page__gap {
	display: inline-flex;
	align-items: center;
	padding: 0 4px;
	color: var(--qehs-text-muted);
}

/* WooCommerce's review form sets size="30" on Name/Email, which is wider
   than a 320px screen: keep its fields within the panel on this page. */
.qehs-bundle-page__content #qehs-product-tab-reviews input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.qehs-bundle-page__content #qehs-product-tab-reviews textarea {
	max-width: 100%;
	box-sizing: border-box;
}

/* ---------------- Mobile ---------------- */

/* Four tabs (the document page has two): let them wrap onto a second
   row on narrow screens instead of running off the side. */
@media (max-width: 900px) {
	.qehs-bundle-page__content .qehs-product-page__tabs {
		flex-wrap: wrap;
		gap: 0 var(--qehs-space-lg);
	}
}

@media (max-width: 640px) {
	.qehs-bundle-page__content .qehs-product-page__tab {
		font-size: 0.95rem;
	}

	.qehs-bundle-page__included-table th:last-child,
	.qehs-bundle-page__included-table td:last-child {
		white-space: normal;
		width: 1%;
	}

	.qehs-bundle-page__included-table tbody td:first-child {
		gap: var(--qehs-space-sm);
		overflow-wrap: anywhere;
	}

	.qehs-bundle-page__included-table th,
	.qehs-bundle-page__included-table td {
		padding: var(--qehs-space-sm) var(--qehs-space-md);
	}

	.qehs-bundle-page__type-icon {
		width: 34px;
		height: 34px;
	}

	/* Document table → stacked labelled rows (no horizontal scrolling). */
	.qehs-bundle-page__table-wrap {
		overflow-x: visible;
	}

	/* Each value carries its own label (data-label) in this layout. */
	.qehs-bundle-page__doc-table thead {
		display: none;
	}

	.qehs-bundle-page__doc-table,
	.qehs-bundle-page__doc-table tbody,
	.qehs-bundle-page__doc-table tr,
	.qehs-bundle-page__doc-table td {
		display: block;
	}

	.qehs-bundle-page__doc-table tr {
		padding: 10px var(--qehs-space-md);
		border-bottom: 1px solid var(--qehs-border);
	}

	.qehs-bundle-page__doc-table tbody tr:last-child {
		border-bottom: none;
	}

	.qehs-bundle-page__doc-table td {
		display: flex;
		gap: var(--qehs-space-sm);
		padding: 2px 0;
		border: none;
		white-space: normal !important;
	}

	.qehs-bundle-page__doc-table td::before {
		content: attr(data-label);
		flex: 0 0 82px;
		font-weight: 600;
		color: var(--qehs-text-muted);
	}

	.qehs-bundle-page__doc-table td:first-child::before {
		content: none;
	}

	.qehs-bundle-page__doc-table td:first-child {
		padding-bottom: 6px;
		font-size: 0.95rem;
	}
}
