/*
 * Greene Resource Library – public library pages ([greene_resource_library]).
 * Follows the site's own resource pages (e.g. Catalogs & Brochures): white breadcrumb bar,
 * light panel over the metal texture, heavy uppercase navy headings, orange actions,
 * Source Sans Pro. Everything is scoped to .greene-rl-library, except DLP's filter popup,
 * which renders in a portal at the end of <body>.
 */

.greene-rl-library {
	--grl-navy: #020d26;
	--grl-text: #06163a;
	--grl-muted: #4f5a70;
	--grl-orange: #ff5e14;
	--grl-orange-dark: #c94306;
	--grl-panel: rgba(238, 238, 238, 0.94);
	--grl-line: #d5d9e0;
	--grl-line-soft: #e8ebef;
	--grl-tint: #f5f6f8;
	--grl-focus: 0 0 0 3px rgba(255, 94, 20, 0.35);
	color: var(--grl-text);
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	margin: 0 0 40px;
	scroll-margin-top: 110px;
}

.greene-rl-library *,
.greene-rl-library *::before,
.greene-rl-library *::after {
	box-sizing: border-box;
}

.greene-rl-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Breadcrumb bar (as on the site's other resource pages) */
.greene-rl-breadcrumb {
	background: #fff;
	padding: 12px 30px;
	font-weight: 600;
	color: #333;
	box-shadow: 0 8px 12px -10px rgba(0, 0, 0, 0.35);
}

.greene-rl-breadcrumb a {
	color: #c94306;
	text-decoration: none;
}

.greene-rl-breadcrumb a:hover,
.greene-rl-breadcrumb a:focus-visible {
	text-decoration: underline;
}

.greene-rl-sep {
	margin: 0 8px;
	font-size: 11px;
	color: #333;
}

/* Panel + header */
.greene-rl-panel {
	max-width: 1400px;
	margin: 24px auto 0;
	padding: 28px 30px 32px;
	background: var(--grl-panel);
}

.greene-rl-title {
	margin: 0 0 12px;
	color: var(--grl-navy);
	font-size: 32px;
	font-weight: 800;
	line-height: 1.1;
	text-transform: uppercase;
}

.greene-rl-intro {
	max-width: 80ch;
	margin: 0 0 12px;
	color: var(--grl-text);
}

.greene-rl-jumps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 4px 0 0;
	font-weight: 600;
}

.greene-rl-jump {
	display: inline-block;
	padding: 5px 14px;
	border: 1px solid var(--grl-navy);
	border-radius: 3px;
	color: var(--grl-navy);
	font-weight: 600;
	text-decoration: none;
	background: #fff;
}

.greene-rl-jump:hover,
.greene-rl-jump:focus-visible {
	background: var(--grl-navy);
	color: #fff;
	text-decoration: none;
}

.greene-rl-note {
	margin: 12px 0 0;
	padding: 6px 12px;
	border-left: 3px solid var(--grl-orange);
	background: #fff;
	color: var(--grl-muted);
	font-size: 14px;
}

/* DLP view: header / count + view switch / list / footer on one grid. DLP places the result
   count in its footer; this moves it above the list without touching its DOM. */
.greene-rl-library .barn2-dataview {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"header header"
		"count tools"
		"list list"
		"perpage pager";
	align-items: center;
	column-gap: 16px;
	background: transparent;
	font-family: inherit;
	color: inherit;
}

.greene-rl-library .layout-header {
	grid-area: header;
}

.greene-rl-library .dataview-container {
	grid-area: list;
}

.greene-rl-library .footer-controls {
	display: contents;
}

.greene-rl-library .pagination-center {
	grid-area: count;
	justify-self: start;
	text-align: left;
}

.greene-rl-library .pagination-left {
	grid-area: perpage;
	padding-top: 16px;
}

.greene-rl-library .pagination-right {
	grid-area: pager;
	padding-top: 16px;
	justify-self: end;
}

.greene-rl-library .document-count-text {
	display: block;
	margin: 0 0 12px;
	color: var(--grl-navy);
	font-weight: 700;
}

/* Grid / List switch (DLP's own icon-only switch stays hidden and is driven from here) */
.greene-rl-library .view-switcher {
	display: none !important;
}

.greene-rl-toolbar {
	grid-area: tools;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
}

.greene-rl-toolbar[hidden] {
	display: none;
}

.greene-rl-toolbar-label {
	color: var(--grl-muted);
	font-size: 14px;
	font-weight: 600;
}

.greene-rl-viewtoggle {
	display: inline-flex;
	border: 1px solid var(--grl-line);
	border-radius: 3px;
	background: #fff;
	overflow: hidden;
}

.greene-rl-viewtoggle button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: var(--grl-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	cursor: pointer;
}

.greene-rl-viewtoggle button + button {
	border-left: 1px solid var(--grl-line);
}

.greene-rl-viewtoggle button svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.greene-rl-viewtoggle button:hover {
	background: #fff1ea;
	color: var(--grl-navy);
}

.greene-rl-viewtoggle button[aria-pressed="true"] {
	background: var(--grl-navy);
	color: #fff;
}

/* Search + filters card */
.greene-rl-library .layout-header {
	margin: 20px 0 18px;
	padding: 18px 20px;
	background: #fff;
	border: 1px solid var(--grl-line-soft);
}

.greene-rl-library .header-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px;
}

.greene-rl-library .header-filters > .layout-component {
	flex: 1 1 200px;
	min-width: 0;
	margin: 0;
}

.greene-rl-library .header-filters > .layout-component-search {
	flex: 2 1 320px;
}

.greene-rl-library .header-filters > .layout-component::before {
	display: block;
	margin: 0 0 5px;
	color: var(--grl-navy);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.greene-rl-library .layout-component-search::before {
	content: "Search";
}

.greene-rl-library .layout-component-filter-doc_categories::before {
	content: "Download Type";
}

.greene-rl-library [class*="layout-component-filter-tax"]::before {
	content: "Product Type";
}

.greene-rl-library .layout-component-filter-file_type::before {
	content: "File Type";
}

.greene-rl-library .search-input-container {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 12px;
	background: #fff;
	border: 1px solid var(--grl-line);
	border-radius: 3px;
}

.greene-rl-library .search-input-container svg {
	position: static !important;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	transform: none !important;
	color: var(--grl-muted);
}

.greene-rl-library .search-input-container:focus-within {
	border-color: var(--grl-orange);
	box-shadow: var(--grl-focus);
}

.greene-rl-library input.search-input {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	background: transparent;
	box-shadow: none !important;
	outline: none;
	color: var(--grl-text);
	font-size: 16px;
}

.greene-rl-library input.search-input::placeholder {
	color: #6b7489;
	opacity: 1;
}

.greene-rl-library .select-display-wrapper {
	position: relative;
}

.greene-rl-library .select-display-trigger {
	display: flex;
	align-items: center;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 64px 0 12px;
	background: #fff;
	border: 1px solid var(--grl-line);
	border-radius: 3px;
	color: var(--grl-text);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.greene-rl-library .select-display-trigger:hover {
	border-color: #9aa3b2;
	background: #fff;
	color: var(--grl-text);
}

.greene-rl-library .select-display-trigger[aria-expanded="true"],
.greene-rl-library .select-display-trigger:focus-visible {
	border-color: var(--grl-orange);
	box-shadow: var(--grl-focus);
	outline: none;
}

.greene-rl-library .select-display-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.greene-rl-library .select-action-buttons {
	position: absolute;
	top: 50%;
	right: 10px;
	display: flex;
	align-items: center;
	gap: 4px;
	transform: translateY(-50%);
	color: var(--grl-muted);
}

.greene-rl-library .select-clear {
	display: inline-flex;
	padding: 4px;
	border: 0;
	background: transparent;
	color: var(--grl-muted);
	cursor: pointer;
}

.greene-rl-library .select-clear:hover,
.greene-rl-library .select-clear:focus-visible {
	color: var(--grl-orange);
	background: transparent;
}

/* Active filters + reset */
.greene-rl-library .header-active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--grl-line-soft);
}

.greene-rl-library .active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.greene-rl-library .active-filter-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 4px 3px 12px;
	border-radius: 999px;
	background: var(--grl-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.greene-rl-library .active-filter-badge-remove {
	display: inline-flex;
	padding: 4px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.greene-rl-library .active-filter-badge-remove:hover,
.greene-rl-library .active-filter-badge-remove:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.greene-rl-library .active-filter-badge-remove svg {
	width: 12px;
	height: 12px;
}

.greene-rl-library .filter-reset-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 2px;
	border: 0;
	background: transparent;
	color: #c94306;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.greene-rl-library .filter-reset-btn:hover,
.greene-rl-library .filter-reset-btn:focus-visible {
	background: transparent;
	color: var(--grl-navy);
}

.greene-rl-library .filter-reset-btn svg {
	width: 14px;
	height: 14px;
}

/* List (DLP table mode) */
.greene-rl-library .dataview-container {
	position: relative;
	background: #fff;
	border: 1px solid var(--grl-line-soft);
}

.greene-rl-library .dataview-container.grid-mode {
	background: transparent;
	border: 0;
}

.greene-rl-library .data-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: auto;
	font-size: 16px;
}

.greene-rl-library .data-table th,
.greene-rl-library .data-table td {
	width: auto !important;
	max-width: none !important;
	border: 0;
	text-align: left;
}

.greene-rl-library .table-header-cell {
	padding: 12px 16px;
	background: var(--grl-tint);
	border-bottom: 1px solid var(--grl-line) !important;
	color: var(--grl-navy);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.greene-rl-library .header-menu-trigger {
	border: 0;
	background: transparent;
	color: var(--grl-muted);
}

.greene-rl-library .header-menu-trigger-active {
	color: var(--grl-orange);
}

.greene-rl-library .data-table tbody td {
	padding: 14px 16px;
	border-top: 1px solid var(--grl-line-soft);
	vertical-align: middle;
}

.greene-rl-library .data-table tbody tr:first-child td {
	border-top: 0;
}

.greene-rl-library .data-table tbody tr:hover td {
	background: #fafbfc;
}

.greene-rl-library .data-table tbody tr.is-selected td {
	background: #fff4ee;
}

.greene-rl-titlecell {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.greene-rl-titletext {
	min-width: 0;
}

.greene-rl-library .col-title a {
	color: var(--grl-navy);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.greene-rl-library .col-title a:hover,
.greene-rl-library .col-title a:focus-visible {
	color: var(--grl-orange-dark);
	text-decoration: underline;
}

.greene-rl-desc {
	display: -webkit-box;
	margin-top: 4px;
	overflow: hidden;
	color: var(--grl-muted);
	font-size: 14.5px;
	line-height: 1.4;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.greene-rl-library .taxonomy-term-group {
	color: var(--grl-text);
}

.greene-rl-format {
	display: inline-block;
	padding: 0 6px;
	border: 1px solid var(--grl-line);
	border-radius: 3px;
	color: var(--grl-navy);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 20px;
}

.greene-rl-size {
	display: block;
	margin-top: 3px;
	color: var(--grl-muted);
	font-size: 13px;
	white-space: nowrap;
}

/* Column widths per view */
.greene-rl-view-all [data-column-id="title"] { width: 42% !important; }
.greene-rl-view-all [data-column-id="doc_categories"] { width: 16% !important; }
.greene-rl-view-all [data-column-id^="tax"] { width: 22% !important; }
.greene-rl-view-design-symbols [data-column-id="title"],
.greene-rl-view-assembly-instructions [data-column-id="title"] { width: 50% !important; }
.greene-rl-view-design-symbols [data-column-id^="tax"],
.greene-rl-view-assembly-instructions [data-column-id^="tax"] { width: 28% !important; }
.greene-rl-library [data-column-id="file_type"] { width: 100px !important; }
.greene-rl-library td[data-column-id="link"] { width: 1% !important; white-space: nowrap; text-align: right; }

/* Select controls */
.greene-rl-select {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
	font-weight: 600;
	user-select: none;
}

.greene-rl-select input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--grl-orange);
	cursor: pointer;
}

.greene-rl-select input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--grl-orange);
	outline-offset: 2px;
}

.greene-rl-select-row {
	padding: 2px 0;
}

.greene-rl-select-row .greene-rl-select-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* Download button */
.greene-rl-library .dlp-download-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: 3px;
	background: var(--grl-orange);
	color: #fff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
}

.greene-rl-library .dlp-download-button:hover,
.greene-rl-library .dlp-download-button:focus-visible {
	background: var(--grl-orange-dark);
	color: #fff !important;
}

.greene-rl-library .dlp-download-button .dlp-button-icon {
	display: inline-flex;
	margin: 0;
}

.greene-rl-library .dlp-download-button svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	color: #fff;
}

.greene-rl-btn-format {
	font-weight: 700;
}

/* Grid (DLP grid mode): Greene cards */
.greene-rl-library .grid-wrapper {
	padding: 0;
}

.greene-rl-library .grid-container {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
	gap: 20px !important;
	margin: 0;
}

.greene-rl-library .grid-card {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.greene-rl-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--grl-line-soft);
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.greene-rl-card:hover,
.greene-rl-card:focus-within {
	border-color: #c4cad4;
	box-shadow: 0 6px 18px rgba(2, 13, 38, 0.12);
}

.greene-rl-card.is-selected {
	border-color: var(--grl-orange);
	box-shadow: 0 0 0 2px var(--grl-orange);
}

.greene-rl-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	background: var(--grl-tint);
	border-bottom: 1px solid var(--grl-line-soft);
	overflow: hidden;
}

.greene-rl-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
}

/* A PDF page on the grey ground, with a little air and a paper edge */
.greene-rl-card-media img.greene-rl-thumb-generated {
	width: auto;
	max-height: calc(100% - 20px);
	box-shadow: 0 1px 4px rgba(2, 13, 38, 0.22);
}

.greene-rl-noimage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 100%;
	background-color: var(--grl-tint, #f5f6f8);
	background-image: linear-gradient(#e6e9ee 1px, transparent 1px), linear-gradient(90deg, #e6e9ee 1px, transparent 1px);
	background-size: 20px 20px;
}

.greene-rl-noimage-format {
	padding: 6px 12px;
	border: 2px solid var(--grl-navy, #020d26);
	background: #fff;
	color: var(--grl-navy, #020d26);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.06em;
}

.greene-rl-noimage-text {
	color: var(--grl-muted, #4f5a70);
	font-size: 13px;
}

.greene-rl-select-card {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1;
	min-height: 40px;
	padding: 0 12px 0 10px;
	border: 1px solid var(--grl-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.96);
	color: var(--grl-navy);
	font-size: 14px;
	box-shadow: 0 1px 3px rgba(2, 13, 38, 0.15);
}

.greene-rl-select-card:hover {
	border-color: var(--grl-orange);
}

.greene-rl-card.is-selected .greene-rl-select-card {
	border-color: var(--grl-orange);
	background: var(--grl-orange);
	color: #fff;
}

.greene-rl-card.is-selected .greene-rl-select-card input[type="checkbox"] {
	accent-color: var(--grl-navy);
}

.greene-rl-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px 16px;
}

.greene-rl-card-type {
	margin: 0;
	color: var(--grl-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

/* Pre-filtered pages: the Download Type is the page itself */
.greene-rl-view-design-symbols .greene-rl-card-type,
.greene-rl-view-assembly-instructions .greene-rl-card-type {
	display: none;
}

.greene-rl-library .greene-rl-card-title {
	margin: 0;
	padding: 0;
	color: var(--grl-navy);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
	text-transform: none;
}

.greene-rl-card-title a {
	color: var(--grl-navy);
	text-decoration: none;
}

.greene-rl-card-title a:hover,
.greene-rl-card-title a:focus-visible {
	color: var(--grl-orange-dark);
	text-decoration: underline;
}

.greene-rl-card-desc {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--grl-muted);
	font-size: 14.5px;
	line-height: 1.45;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.greene-rl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.greene-rl-chip {
	padding: 2px 10px;
	border-radius: 999px;
	background: #e9edf4;
	color: var(--grl-text, #06163a);
	font-size: 12.5px;
	line-height: 1.5;
}

.greene-rl-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0;
	color: var(--grl-muted);
	font-size: 13px;
}

.greene-rl-card-meta .greene-rl-size {
	display: inline;
	margin: 0;
}

.greene-rl-rev {
	white-space: nowrap;
}

.greene-rl-card-actions {
	margin-top: auto;
	padding-top: 4px;
}

.greene-rl-card-actions .dlp-grid-card-document-link-wrap {
	margin: 0;
	padding: 0;
}

.greene-rl-card-actions .dlp-download-button {
	width: 100%;
}

/* Empty + loading */
.greene-rl-library .data-table tbody td[colspan],
.greene-rl-library .dataview-empty,
.greene-rl-library .no-results {
	padding: 40px 16px;
	color: var(--grl-muted);
	font-size: 17px;
	text-align: center;
}

.greene-rl-library .greene-rl-results {
	position: relative;
}

.greene-rl-library.is-loading .dataview-container {
	opacity: 0.5;
	transition: opacity 0.15s;
}

.greene-rl-library.is-loading .greene-rl-results::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--grl-orange), transparent);
	background-size: 50% 100%;
	background-repeat: no-repeat;
	animation: greene-rl-progress 0.9s linear infinite;
}

@keyframes greene-rl-progress {
	from { background-position: -50% 0; }
	to { background-position: 150% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.greene-rl-library.is-loading .greene-rl-results::before {
		animation: none;
		background: var(--grl-orange);
	}

	.greene-rl-card {
		transition: none;
	}
}

/* Pagination + per page */
.greene-rl-library .per-page-selector {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--grl-muted);
	font-size: 15px;
}

.greene-rl-library .per-page-selector-trigger,
.greene-rl-library .pagination-right button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--grl-line);
	border-radius: 3px;
	background: #fff;
	color: var(--grl-text);
	font-family: inherit;
	font-size: 15px;
	cursor: pointer;
}

.greene-rl-library .pagination-right button:hover,
.greene-rl-library .per-page-selector-trigger:hover {
	border-color: var(--grl-orange);
	background: #fff;
	color: var(--grl-orange-dark);
}

.greene-rl-library .pagination-right [aria-current="page"],
.greene-rl-library .pagination-right .active,
.greene-rl-library .pagination-right button[data-active] {
	border-color: var(--grl-navy);
	background: var(--grl-navy);
	color: #fff;
}

.greene-rl-library .pagination-right button:disabled {
	opacity: 0.4;
	cursor: default;
}

/* "Download selected" bar */
.greene-rl-bulkbar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
	background: var(--grl-navy);
	color: #fff;
	box-shadow: 0 -6px 18px rgba(2, 13, 38, 0.28);
}

.greene-rl-bulkbar[hidden] {
	display: none;
}

.greene-rl-bulkbar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	max-width: 1400px;
	margin: 0 auto;
}

.greene-rl-bulkbar p {
	margin: 0;
}

.greene-rl-bulkbar-count {
	font-size: 17px;
}

.greene-rl-bulkbar-hidden {
	color: #c9d0dd;
	font-size: 14px;
}

.greene-rl-bulkbar-message {
	flex: 1 1 240px;
	color: #e8ecf3;
	font-size: 14.5px;
}

.greene-rl-bulkbar-message:empty {
	display: none;
}

.greene-rl-bulkbar-actions {
	display: flex;
	gap: 10px;
	margin-left: auto;
}

.greene-rl-bulkbar button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 18px;
	border-radius: 3px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
}

.greene-rl-bulkbar-clear {
	border: 1px solid rgba(255, 255, 255, 0.7);
	background: transparent;
	color: #fff;
}

.greene-rl-bulkbar-clear:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.greene-rl-bulkbar-download {
	border: 0;
	background: var(--grl-orange);
	color: #fff;
}

.greene-rl-bulkbar-download:hover {
	background: #e44f0c;
	color: #fff;
}

.greene-rl-bulkbar-download:disabled {
	opacity: 0.75;
	cursor: progress;
}

.greene-rl-bulkbar-download svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.greene-rl-bulkbar-zip {
	font-weight: 400;
}

.greene-rl-bulkbar button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Nothing on the page ends up hidden behind the bar */
body.greene-rl-has-selection {
	padding-bottom: var(--greene-rl-bar-height, 80px);
}

/* Keyboard focus */
.greene-rl-library a:focus-visible,
.greene-rl-library button:focus-visible {
	outline: 3px solid var(--grl-orange);
	outline-offset: 2px;
	box-shadow: none;
}

/* Filter popup (portal at the end of <body>) */
.barn2-select-popup {
	min-width: 220px;
	max-height: 340px;
	overflow: auto;
	padding: 6px 0;
	background: #fff;
	border: 1px solid #c9ced6;
	border-radius: 3px;
	box-shadow: 0 10px 28px rgba(2, 13, 38, 0.18);
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 16px;
	color: #06163a;
}

.barn2-select-item {
	padding: 9px 14px;
	cursor: pointer;
}

.barn2-select-item[data-highlighted],
.barn2-select-item:hover {
	background: #fff1ea;
}

.barn2-select-item[aria-selected="true"] {
	color: #020d26;
	font-weight: 700;
}

.barn2-select-item-text {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.barn2-select-item-count {
	color: #4f5a70;
	font-weight: 400;
}

/* Tablet */
@media (max-width: 1024px) {
	.greene-rl-panel {
		margin-top: 16px;
		padding: 24px 20px 28px;
	}

	.greene-rl-view-all .data-table [data-column-id="doc_categories"] {
		display: none;
	}

	.greene-rl-library .grid-container {
		grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
		gap: 16px !important;
	}
}

/* Phone */
@media (max-width: 767px) {
	.greene-rl-library {
		scroll-margin-top: 70px;
	}

	.greene-rl-breadcrumb {
		padding: 10px 16px;
		font-size: 14px;
	}

	.greene-rl-panel {
		margin: 12px 0 0;
		padding: 20px 14px 24px;
	}

	.greene-rl-title {
		font-size: 26px;
	}

	.greene-rl-library .layout-header {
		display: block !important;
		padding: 14px;
	}

	/* DLP switches the filter row to display:contents on narrow screens. */
	.greene-rl-library .header-filters {
		display: flex !important;
		flex-direction: column;
		align-items: stretch;
	}

	.greene-rl-library .header-filters > .layout-component {
		flex: 1 1 auto !important;
		width: 100% !important;
	}

	.greene-rl-library .barn2-dataview {
		grid-template-areas:
			"header header"
			"count tools"
			"list list"
			"pager pager"
			"perpage perpage";
	}

	.greene-rl-library .pagination-right {
		justify-self: center;
	}

	.greene-rl-toolbar-label {
		display: none;
	}

	.greene-rl-viewtoggle button {
		min-height: 44px;
		padding: 0 12px;
	}

	.greene-rl-library .dataview-container {
		background: transparent;
		border: 0;
	}

	/* List: rows become cards */
	.greene-rl-library .data-table thead {
		display: none;
	}

	.greene-rl-library .data-table,
	.greene-rl-library .data-table tbody,
	.greene-rl-library .data-table tr,
	.greene-rl-library .data-table td {
		display: block !important;
		width: 100% !important;
	}

	/* DLP's own "show more" toggle is not used: every field is shown on the card. */
	.greene-rl-library .has-responsive-control > button[aria-expanded] {
		display: none !important;
	}

	.greene-rl-library .data-table tbody tr {
		margin: 0 0 12px;
		padding: 14px;
		background: #fff;
		border: 1px solid var(--grl-line-soft);
	}

	.greene-rl-library .data-table tbody tr.is-selected {
		border-color: var(--grl-orange);
		box-shadow: 0 0 0 1px var(--grl-orange);
	}

	.greene-rl-library .data-table tbody td,
	.greene-rl-view-all .data-table [data-column-id="doc_categories"] {
		display: block !important;
		padding: 4px 0;
		border: 0;
		text-align: left !important;
	}

	.greene-rl-library .data-table tbody tr:hover td,
	.greene-rl-library .data-table tbody tr.is-selected td {
		background: transparent;
	}

	.greene-rl-library .data-table td[data-column-id="doc_categories"]::before,
	.greene-rl-library .data-table td[data-column-id^="tax"]::before {
		display: block;
		color: var(--grl-muted);
		font-size: 12px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.greene-rl-library .data-table td[data-column-id="doc_categories"]::before {
		content: "Download Type";
	}

	.greene-rl-library .data-table td[data-column-id^="tax"]::before {
		content: "Product Type";
	}

	.greene-rl-library .data-table td[data-column-id="file_type"] .greene-rl-size {
		display: inline;
		margin-left: 8px;
	}

	.greene-rl-select-row input[type="checkbox"] {
		width: 24px;
		height: 24px;
	}

	.greene-rl-library td[data-column-id="link"] {
		padding-top: 10px !important;
	}

	.greene-rl-library td[data-column-id="link"] .dlp-download-button {
		width: 100%;
		min-height: 46px;
	}

	/* Grid: one column of compact cards, preview beside the text */
	.greene-rl-library .grid-container {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 12px !important;
	}

	.greene-rl-card {
		display: grid;
		grid-template-columns: 112px minmax(0, 1fr);
	}

	.greene-rl-card-media {
		aspect-ratio: auto;
		min-height: 140px;
		border-right: 1px solid var(--grl-line-soft);
		border-bottom: 0;
	}

	.greene-rl-card-media img.greene-rl-thumb-generated {
		max-width: calc(100% - 16px);
		max-height: calc(100% - 64px);
		margin-top: 44px;
	}

	.greene-rl-noimage {
		padding-top: 44px;
	}

	.greene-rl-noimage-format {
		font-size: 17px;
	}

	.greene-rl-noimage-text {
		display: none;
	}

	.greene-rl-select-card {
		top: 8px;
		left: 8px;
		min-height: 44px;
		padding: 0 10px 0 8px;
	}

	.greene-rl-card-body {
		gap: 6px;
		padding: 12px;
	}

	.greene-rl-library .greene-rl-card-title {
		font-size: 16px;
	}

	.greene-rl-card-desc {
		font-size: 14px;
		-webkit-line-clamp: 2;
	}

	.greene-rl-card-actions .dlp-download-button {
		min-height: 46px;
	}

	/* Bar: count on top, two full-width buttons */
	.greene-rl-bulkbar {
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
	}

	.greene-rl-bulkbar-inner {
		gap: 6px 12px;
	}

	.greene-rl-bulkbar-count {
		font-size: 16px;
	}

	.greene-rl-bulkbar-message {
		flex-basis: 100%;
		order: 3;
	}

	.greene-rl-bulkbar-actions {
		flex: 1 1 100%;
		margin: 0;
	}

	.greene-rl-bulkbar-clear {
		flex: 0 0 auto;
		padding: 0 12px;
	}

	.greene-rl-bulkbar-download {
		flex: 1 1 auto;
	}

	.greene-rl-bulkbar button {
		min-height: 48px;
		font-size: 15px;
	}
}

/* Single resource page (/document/<slug>/, Single_View): the destination of old WPDM package URLs. */
.greene-rl-single {
	max-width: 1200px;
	margin: 0 auto 40px;
}

.greene-rl-single-panel {
	display: grid;
	grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.greene-rl-single-media img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--grl-line);
	background: #fff;
	box-shadow: 0 6px 18px -10px rgba(2, 13, 38, 0.45);
}

.greene-rl-single-media .greene-rl-card-media {
	aspect-ratio: 3 / 4;
}

.greene-rl-single .greene-rl-title {
	margin: 4px 0 14px;
	overflow-wrap: anywhere;
}

.greene-rl-single .greene-rl-chips {
	margin: 0 0 12px;
}

.greene-rl-single .greene-rl-card-meta {
	margin: 0 0 18px;
}

.greene-rl-single-content .dlp-buttons-container {
	margin: 0 0 18px;
}

.greene-rl-single-content .dlp-download-link.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 3px;
	background: var(--grl-orange);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.greene-rl-single-content .dlp-download-link.wp-block-button__link:hover,
.greene-rl-single-content .dlp-download-link.wp-block-button__link:focus-visible {
	background: var(--grl-orange-dark);
	color: #fff;
	outline: none;
	box-shadow: var(--grl-focus);
}

.greene-rl-single-content .dlp-download-link .dlp-button-icon {
	width: 18px;
	height: 18px;
	margin: 0;
}

/* The format, size and Download Type are shown above; DLP's own list would repeat them. */
.greene-rl-single-content .wp-block-document-library-pro-document-data,
.greene-rl-single-content .dlp-featured-image:empty {
	display: none;
}

.greene-rl-single-back {
	margin: 8px 0 0;
	font-weight: 600;
}

.greene-rl-single-back a {
	color: var(--grl-orange-dark);
	text-decoration: none;
}

.greene-rl-single-back a:hover,
.greene-rl-single-back a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 767px) {
	.greene-rl-single-panel {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.greene-rl-single-media {
		max-width: 280px;
	}

	.greene-rl-single .greene-rl-title {
		font-size: 26px;
	}
}
