/**
 * GD Hub Filters Stylesheet - v2 (matches reference design)
 *
 * Design: Rounded colored pill buttons in sidebar, pill buttons for content types on top,
 * cards with image at top, content-type badge below, title at bottom.
 */

/* Color defaults - overridden by PHP-injected CSS variables from Customizer → Hub Colors */
:root {
	--gd-hub-primary: #3e7993;
	--gd-hub-secondary: #203d48;
	--gd-hub-accent: #f49b53;
	--gd-hub-show-all: #203d48;    /* "Show All" button */
	--gd-hub-new-color: #f453a1;   /* "New" button */
	--gd-hub-hub-badge: #f49b53;   /* "HUB" badge in sticky header */
	--gd-hub-card-badge: #91d2dc;  /* Content-type badge on cards */
	--gd-hub-strand-1: #f7da6a;    /* Strand 1 - Yellow */
	--gd-hub-strand-2: #91d2dc;    /* Strand 2 - Light Blue */
	--gd-hub-strand-3: #d6e492;    /* Strand 3 - Light Green */
	--gd-hub-strand-4: #3c887b;    /* Strand 4 - Dark Green */
	--gd-hub-strand-5: #a0a0a0;    /* Unifying Strand - Grey */
	--gd-hub-text-dark: #203d48;
	--gd-hub-text-light: #ffffff;
	--gd-hub-bg-light: #f9f9f9;
	--gd-hub-border-light: #e0e0e0;

	/* Spacing */
	--gd-hub-spacing-xs: 0.5rem;
	--gd-hub-spacing-sm: 1rem;
	--gd-hub-spacing-md: 1.5rem;
	--gd-hub-spacing-lg: 2rem;
	--gd-hub-spacing-xl: 3rem;

	/* Typography */
	--gd-hub-font-family: inherit;
	--gd-hub-line-height-base: 1.5;

	/* Shadows */
	--gd-hub-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--gd-hub-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	--gd-hub-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);

	/* Border radius */
	--gd-hub-radius-pill: 999px;
	--gd-hub-radius-card: 30px;
	--gd-hub-radius-sm: 8px;

	/* Transitions */
	--gd-hub-transition: 200ms ease-in-out;
}

/* ============================================================================
   Layout
   ============================================================================ */

.gd-hub-page {
	font-family: var(--gd-hub-font-family);
	color: var(--gd-hub-text-dark);
	line-height: var(--gd-hub-line-height-base);
	max-width: 1400px;
	margin: 0 auto;
	padding: var(--gd-hub-spacing-lg) var(--gd-hub-spacing-md);
}

/* ============================================================================
   Sticky Frosted-Glass Header
   ============================================================================ */

.gd-hub-sticky-header {
	position: relative;
	z-index: 50;
	margin-bottom: var(--gd-hub-spacing-lg);
	pointer-events: none; /* allow interaction with inner only */
}

.gd-hub-sticky-header__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--gd-hub-spacing-sm);
	max-width: 900px;
	margin: 0 auto;
	padding: var(--gd-hub-spacing-md) var(--gd-hub-spacing-lg);

	/* Frosted glass effect - fixed blue color, independent of strand colors */
	background: color-mix(in srgb, #91d2dc 55%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	border-radius: 32px;
	box-shadow: 0 6px 24px rgba(32, 61, 72, 0.08),
	            0 1px 0 rgba(255, 255, 255, 0.4) inset;

	pointer-events: auto;
}

/* Fallback for browsers without color-mix support */
@supports not (background: color-mix(in srgb, red, blue)) {
	.gd-hub-sticky-header__inner {
		background: rgba(145, 210, 220, 0.55);
	}
}

.gd-hub-sticky-header__title {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--gd-hub-secondary);
	line-height: 1;
}

.gd-hub-sticky-header__title-text {
	color: var(--gd-hub-secondary);
}

.gd-hub-sticky-header__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem 0.6rem;
	background: var(--gd-hub-hub-badge, var(--gd-hub-accent, #da543f));
	color: var(--gd-hub-text-light);
	border-radius: 999px;
	font-size: 0.65em;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1;
	transform: translateY(-0.15em);
}

/* Mobile-only toggle button to collapse/expand content types */
.gd-hub-content-types-toggle {
	display: none; /* hidden on desktop by default */
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: rgba(32, 61, 72, 0.1);
	color: var(--gd-hub-secondary);
	border-radius: 50%;
	cursor: pointer;
	transition: background var(--gd-hub-transition), transform var(--gd-hub-transition);
	margin-left: 0.25rem;
	flex-shrink: 0;
}

.gd-hub-content-types-toggle:hover {
	background: rgba(32, 61, 72, 0.2);
}

.gd-hub-content-types-toggle:focus-visible {
	outline: 2px solid var(--gd-hub-secondary);
	outline-offset: 2px;
}

.gd-hub-content-types-toggle__icon {
	transition: transform var(--gd-hub-transition);
}

.gd-hub-content-types-toggle[aria-expanded="true"] .gd-hub-content-types-toggle__icon {
	transform: rotate(180deg);
}

/* Content-type pills inside sticky header - override margins */
.gd-hub-sticky-header .gd-hub-content-types {
	margin-bottom: 0;
	width: 100%;
}

.gd-hub-sticky-header .gd-hub-pills {
	justify-content: center;
}

/* Pills inside the frosted header use a transparent style */
.gd-hub-sticky-header .gd-hub-pill__label {
	background: transparent;
	border-color: var(--gd-hub-secondary);
	color: var(--gd-hub-secondary);
}

.gd-hub-sticky-header .gd-hub-pill:hover .gd-hub-pill__label {
	background: rgba(255, 255, 255, 0.4);
}

.gd-hub-sticky-header .gd-hub-pill__input:checked + .gd-hub-pill__label {
	background: var(--gd-hub-secondary);
	border-color: var(--gd-hub-secondary);
	color: var(--gd-hub-text-light);
}

/* Dynamic shadow/state on scroll (JS-added class) */
.gd-hub-sticky-header.is-pinned .gd-hub-sticky-header__inner {
	box-shadow: 0 10px 32px rgba(32, 61, 72, 0.15),
	            0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.gd-hub-wrapper {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: var(--gd-hub-spacing-xl);
	align-items: start;
}

.gd-hub-main {
	min-width: 0;
}

/* ============================================================================
   Sidebar (Strand Pills)
   ============================================================================ */

.gd-hub-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--gd-hub-spacing-sm);
}

/* Base pill button style */
.gd-hub-pill-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: var(--gd-hub-spacing-sm) var(--gd-hub-spacing-md);
	border: none;
	outline: none;
	border-radius: var(--gd-hub-radius-pill);
	background: var(--gd-hub-border-light);
	color: var(--gd-hub-text-dark);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--gd-hub-transition), filter var(--gd-hub-transition);
	box-shadow: none;
	text-align: center;
	letter-spacing: 0.01em;
}

.gd-hub-pill-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.15);    /* 15% lighter on hover */
}

.gd-hub-pill-btn:focus-visible {
	outline: 3px solid var(--gd-hub-text-dark);
	outline-offset: 2px;
}

.gd-hub-pill-btn:active {
	transform: translateY(0);
	filter: brightness(1.25);    /* 25% lighter when clicked */
}

/* Show All - uses its own customisable colour, falls back to secondary */
.gd-hub-pill-btn--show-all {
	background: var(--gd-hub-show-all, var(--gd-hub-secondary));
	color: var(--gd-hub-text-light);
}

.gd-hub-pill-btn--show-all.is-active {
	box-shadow: 0 0 0 3px var(--gd-hub-show-all, var(--gd-hub-secondary));
	filter: brightness(1.2);    /* 20% lighter when selected */
}

/* New button - orange/accent */
.gd-hub-pill-btn--new {
	background: var(--gd-hub-new-color, var(--gd-hub-accent));
	color: var(--gd-hub-text-light);
}

/* Strand pill buttons - use strand color */
.gd-hub-pill-btn--strand {
	background: var(--strand-color, var(--gd-hub-border-light));
	color: var(--gd-hub-text-dark);
}

.gd-hub-pill-btn--strand.is-active {
	box-shadow: 0 0 0 3px var(--strand-color);
	filter: brightness(1.2);    /* 20% lighter when selected */
}

/* Strand group (parent + children) */
.gd-hub-strand-group {
	display: flex;
	flex-direction: column;
	gap: var(--gd-hub-spacing-xs);
}

.gd-hub-strand-children {
	display: none;
	padding: var(--gd-hub-spacing-xs) 0 var(--gd-hub-spacing-xs) var(--gd-hub-spacing-sm);
	margin: 0;
	border-left: 3px solid var(--strand-color, var(--gd-hub-border-light));
	border-radius: 0;
}

.gd-hub-strand-group.is-expanded .gd-hub-strand-children {
	display: flex;
	flex-direction: column;
	gap: var(--gd-hub-spacing-xs);
	animation: gdSlideDown var(--gd-hub-transition);
}

@keyframes gdSlideDown {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Child pill (chapter) */
.gd-hub-strand-child {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 0.625rem var(--gd-hub-spacing-md);
	border: 2px solid var(--gd-hub-border-light);
	background: var(--gd-hub-text-light);
	color: var(--gd-hub-text-dark);
	border-radius: var(--gd-hub-radius-pill);
	cursor: pointer;
	transition: all var(--gd-hub-transition);
	font-size: 0.9rem;
	font-weight: 500;
	justify-content: center;
	text-align: center;
	position: relative;
}

.gd-hub-strand-child:hover {
	border-color: var(--gd-hub-text-dark);
}

.gd-hub-strand-child .gd-hub-filter-checkbox__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.gd-hub-strand-child:has(.gd-hub-filter-checkbox__input:checked) {
	background: var(--strand-color, var(--gd-hub-primary));
	border-color: var(--strand-color, var(--gd-hub-primary));
	color: var(--gd-hub-text-dark);
}

.gd-hub-strand-child:has(.gd-hub-filter-checkbox__input:focus-visible) {
	outline: 3px solid var(--gd-hub-text-dark);
	outline-offset: 2px;
}

.gd-hub-strand-child__label {
	pointer-events: none;
}

/* Hide hidden parent checkboxes */
.gd-hub-parent-checkbox {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	pointer-events: none;
}

/* ============================================================================
   Top Content-Type Pills
   ============================================================================ */

.gd-hub-content-types {
	margin-bottom: var(--gd-hub-spacing-lg);
}

.gd-hub-content-types__heading {
	display: none; /* Hidden to match reference; override to show */
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 var(--gd-hub-spacing-sm);
	color: var(--gd-hub-text-dark);
}

.gd-hub-pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gd-hub-spacing-xs);
	justify-content: flex-start;
}

.gd-hub-pill {
	position: relative;
	display: inline-block;
}

.gd-hub-pill__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	cursor: pointer;
}

.gd-hub-pill__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0.5rem 1.25rem;
	background: var(--gd-hub-text-light);
	border: 2px solid var(--gd-hub-border-light);
	border-radius: var(--gd-hub-radius-pill);
	color: var(--gd-hub-text-dark);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all var(--gd-hub-transition);
	white-space: nowrap;
	user-select: none;
}

.gd-hub-pill:hover .gd-hub-pill__label {
	border-color: var(--gd-hub-text-dark);
}

.gd-hub-pill__input:checked + .gd-hub-pill__label {
	background: var(--gd-hub-secondary);
	border-color: var(--gd-hub-secondary);
	color: var(--gd-hub-text-light);
}

.gd-hub-pill__input:focus-visible + .gd-hub-pill__label {
	outline: 3px solid var(--gd-hub-secondary);
	outline-offset: 2px;
}

/* ============================================================================
   Content Grid
   ============================================================================ */

.gd-hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--gd-hub-spacing-md);
	position: relative;
	min-height: 200px;
}

.gd-hub-grid.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ============================================================================
   Content Card
   ============================================================================ */

.gd-hub-card {
	background: var(--gd-hub-text-light);
	border-radius: var(--gd-hub-radius-card);
	overflow: hidden;
	box-shadow: var(--gd-hub-shadow-md);
	transition: transform var(--gd-hub-transition), box-shadow var(--gd-hub-transition);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.gd-hub-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--gd-hub-shadow-lg);
}

.gd-hub-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.gd-hub-card__link:focus-visible {
	outline: 3px solid var(--gd-hub-primary);
	outline-offset: -3px;
	border-radius: var(--gd-hub-radius-card);
}

.gd-hub-card__image-wrapper {
	width: 100%;
	padding-top: 100%; /* 1:1 square */
	position: relative;
	overflow: hidden;
	margin: 0;
	background: var(--gd-hub-bg-light);
}

.gd-hub-card__image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Placeholder for cards without featured images */
.gd-hub-card__image-wrapper--placeholder {
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: var(--gd-hub-spacing-lg) !important;
	position: relative;
}

.gd-hub-card__placeholder-text {
	color: var(--gd-hub-text-dark);
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	line-height: 1.4;
	word-wrap: break-word;
	max-width: 100%;
	padding: 0 var(--gd-hub-spacing-sm);
}

.gd-hub-card__content {
	padding: var(--gd-hub-spacing-md);
	display: flex;
	flex-direction: column;
	gap: var(--gd-hub-spacing-sm);
	flex: 1;
}

.gd-hub-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.gd-hub-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--gd-hub-card-badge, var(--gd-hub-strand-2));
	color: var(--gd-hub-text-dark);
	border-radius: 30px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.gd-hub-card__title {
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	color: var(--gd-hub-text-dark);
}

/* ============================================================================
   States (empty / loading / error)
   ============================================================================ */

.gd-hub-no-results,
.gd-hub-error,
.gd-hub-no-filters {
	grid-column: 1 / -1;
	padding: var(--gd-hub-spacing-xl);
	text-align: center;
	background: var(--gd-hub-bg-light);
	border-radius: var(--gd-hub-radius-card);
	color: var(--gd-hub-text-dark);
	font-size: 1rem;
}

.gd-hub-no-filters {
	margin: 0;
	padding: var(--gd-hub-spacing-sm);
	font-size: 0.875rem;
}

.gd-hub-error {
	background: #fff2f0;
	color: #da543f;
	font-weight: 600;
}

/* Hide filter section heading by default (matches reference) */
.gd-hub-filters__heading {
	display: none;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 900px) {
	.gd-hub-wrapper {
		grid-template-columns: 1fr;
		gap: var(--gd-hub-spacing-md);
	}

	.gd-hub-sidebar {
		position: relative;
		top: auto;
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: var(--gd-hub-spacing-xs);
	}

	.gd-hub-strand-group {
		grid-column: span 1;
	}

	.gd-hub-pill-btn--show-all,
	.gd-hub-pill-btn--new {
		grid-column: 1 / -1;
	}

	/* Force 2 columns on all mobile/tablet viewports */
	.gd-hub-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: var(--gd-hub-spacing-md);
	}
}

@media (max-width: 600px) {
	.gd-hub-page {
		padding: var(--gd-hub-spacing-md) var(--gd-hub-spacing-sm);
	}

	.gd-hub-sidebar {
		grid-template-columns: 1fr 1fr;
	}

	/* Force 2 columns on mobile/tablet for better density */
	.gd-hub-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: var(--gd-hub-spacing-sm);
	}

	.gd-hub-card__title {
		font-size: 0.95rem;
	}

	.gd-hub-card__content {
		padding: var(--gd-hub-spacing-sm);
	}

	.gd-hub-badge {
		font-size: 0.7rem;
		padding: 4px 10px;
	}
}

/* Extra small phones */
@media (max-width: 380px) {
	.gd-hub-grid {
		gap: 8px;
	}

	.gd-hub-card__title {
		font-size: 0.85rem;
	}
}

/* ============================================================================
   Accessibility: High contrast / Reduced motion
   ============================================================================ */

@media (prefers-contrast: more) {
	.gd-hub-pill-btn,
	.gd-hub-strand-child,
	.gd-hub-pill__label {
		border-width: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gd-hub-pill-btn,
	.gd-hub-card,
	.gd-hub-card__image,
	.gd-hub-strand-children {
		transition: none !important;
		animation: none !important;
	}
}

/* ============================================================================
   Mobile Filter Toggle & Drawer (Off-Canvas)
   ============================================================================ */

/* Floating Action Button (FAB) - only visible on mobile */
.gd-hub-filter-fab {
	display: none;
	position: fixed;
	bottom: 2rem;
	right: 1.5rem;
	z-index: 100;
	width: 56px;
	height: 56px;
	min-width: 56px;
	min-height: 56px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--gd-hub-secondary);
	color: var(--gd-hub-text-light);
	font-family: inherit;
	cursor: pointer;
	transition: all var(--gd-hub-transition);
	box-shadow: 0 4px 12px rgba(32, 61, 72, 0.3), var(--gd-hub-shadow-lg);
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.gd-hub-filter-fab:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(32, 61, 72, 0.4), var(--gd-hub-shadow-lg);
}

.gd-hub-filter-fab:active {
	transform: scale(0.95);
}

.gd-hub-filter-fab:focus-visible {
	outline: 3px solid var(--gd-hub-text-dark);
	outline-offset: 2px;
}

.gd-hub-filter-fab__icon {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

/* Filter drawer overlay - semi-transparent backdrop */
.gd-hub-filters-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(32, 61, 72, 0.6);
	z-index: 90;
	opacity: 0;
	transition: opacity var(--gd-hub-transition);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.gd-hub-filters-overlay.is-open {
	display: block;
	opacity: 1;
}

/* Filter drawer - inline on desktop (visible), drawer on mobile (hidden until opened) */
.gd-hub-filters {
	display: block;
	position: static;
	width: auto;
	background: transparent;
	box-shadow: none;
	overflow-y: visible;
}

/* Desktop: sidebar visible inline and sticky while scrolling */
@media (min-width: 901px) {
	.gd-hub-filters {
		position: sticky !important;
		top: 10rem !important;
		left: auto !important;
		bottom: auto !important;
		width: auto !important;
		display: block !important;
		background: transparent !important;
		box-shadow: none !important;
		z-index: auto !important;
		overflow: visible !important;
		align-self: start; /* important in grid/flex context for sticky to work */
	}

	/* Hide drawer header on desktop */
	.gd-hub-filters__header {
		display: none !important;
	}

	/* Hide FAB on desktop */
	.gd-hub-filter-fab {
		display: none !important;
	}

	/* Hide overlay on desktop */
	.gd-hub-filters-overlay {
		display: none !important;
	}
}

/* Drawer header hidden on desktop */
.gd-hub-filters__header {
	display: none;
}

.gd-hub-filters__heading {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--gd-hub-text-dark);
	white-space: nowrap;
	margin-bottom: var(--gd-hub-spacing-sm);
}

.gd-hub-filters__close {
	display: none;
}

.gd-hub-filters__close-icon {
	width: 24px;
	height: 24px;
}

/* Sidebar padding and content area - desktop inline */
.gd-hub-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--gd-hub-spacing-sm);
	position: sticky;
	top: calc(1rem + 180px);
	padding: 0;
}

@media (max-width: 700px) {
	.gd-hub-sidebar {
		top: auto;
	}
}

/* Mobile breakpoint: convert sidebar to floating popover card */
@media (max-width: 900px) {
	.gd-hub-wrapper {
		grid-template-columns: 1fr;
		gap: var(--gd-hub-spacing-lg);
	}

	/* Show FAB on mobile */
	.gd-hub-filter-fab {
		display: flex;
	}

	/* Convert filters to floating popover card near FAB */
	.gd-hub-filters {
		position: fixed;
		bottom: 5.5rem;
		right: 1.5rem;
		top: auto;
		left: auto;
		width: 260px;
		max-height: 70vh;
		z-index: 95;
		background: var(--gd-hub-text-light);
		border-radius: 20px;
		box-shadow: 0 10px 40px rgba(32, 61, 72, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
		overflow: hidden;
		transform: scale(0) translateY(20px);
		transform-origin: bottom right;
		opacity: 0;
		transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease-out;
		display: flex;
		flex-direction: column;
		pointer-events: none;
	}

	.gd-hub-filters.is-open {
		transform: scale(1) translateY(0);
		opacity: 1;
		pointer-events: auto;
	}

	/* Popover header */
	.gd-hub-filters__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: var(--gd-hub-spacing-sm) var(--gd-hub-spacing-md);
		border-bottom: 1px solid var(--gd-hub-border-light);
		background: var(--gd-hub-text-light);
		gap: var(--gd-hub-spacing-sm);
		flex-shrink: 0;
	}

	.gd-hub-filters__heading {
		margin: 0;
		font-size: 0.95rem;
		font-weight: 700;
		color: var(--gd-hub-text-dark);
		white-space: nowrap;
	}

	/* Close button (smaller in popover) */
	.gd-hub-filters__close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 30px;
		height: 30px;
		min-width: 30px;
		min-height: 30px;
		padding: 0;
		border: none;
		background: var(--gd-hub-bg-light);
		color: var(--gd-hub-text-dark);
		cursor: pointer;
		transition: all var(--gd-hub-transition);
		border-radius: 50%;
		flex-shrink: 0;
	}

	.gd-hub-filters__close:hover {
		background: var(--gd-hub-border-light);
		transform: rotate(90deg);
	}

	.gd-hub-filters__close:focus-visible {
		outline: 2px solid var(--gd-hub-text-dark);
		outline-offset: 2px;
	}

	.gd-hub-filters__close-icon {
		width: 18px;
		height: 18px;
	}

	.gd-hub-sidebar {
		position: static;
		top: auto;
		padding: var(--gd-hub-spacing-sm);
		flex: 1;
		overflow-y: auto;
		gap: 6px;
	}

	/* Compact pill buttons in popover */
	.gd-hub-filters .gd-hub-pill-btn {
		min-height: 40px;
		padding: 8px 14px;
		font-size: 0.85rem;
		border-radius: 999px;
	}

	.gd-hub-filters .gd-hub-strand-child {
		min-height: 34px;
		padding: 6px 12px;
		font-size: 0.8rem;
	}

	/* Lighter overlay without heavy blur */
	.gd-hub-filters-overlay {
		display: none;
		background: rgba(32, 61, 72, 0.2);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.gd-hub-filters.is-open ~ .gd-hub-filters-overlay,
	.gd-hub-filters-overlay.is-open {
		display: block;
	}

	/* FAB transforms to X when popover is open */
	.gd-hub-filter-fab[aria-expanded="true"] .gd-hub-filter-fab__icon {
		transform: rotate(45deg);
	}

	.gd-hub-filter-fab__icon {
		transition: transform var(--gd-hub-transition);
	}
}

/* Tablet breakpoint: smaller popover and FAB position */
@media (max-width: 600px) {
	.gd-hub-filter-fab {
		bottom: 1.5rem;
		right: 1rem;
	}

	.gd-hub-filters {
		bottom: 5rem;
		right: 1rem;
		width: 240px;
	}
}

/* ============================================================================
   Print styles
   ============================================================================ */

/* ============================================================================
   Mobile - Collapsible Content Types Bar
   ============================================================================ */

@media (max-width: 900px) {
	/* Show the toggle button on mobile */
	.gd-hub-content-types-toggle {
		display: inline-flex;
	}

	/* Reduce header padding on mobile */
	.gd-hub-sticky-header__inner {
		padding: var(--gd-hub-spacing-sm) var(--gd-hub-spacing-md);
		gap: 0;
	}

	/* Make title row more compact on mobile */
	.gd-hub-sticky-header__title {
		gap: 0.4rem;
	}

	/* Collapse content types by default on mobile */
	.gd-hub-sticky-header .gd-hub-content-types {
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		margin-top: 0;
		transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out, margin-top 0.25s ease-in-out;
	}

	/* Expanded state - reveal content types */
	.gd-hub-sticky-header .gd-hub-content-types.is-expanded {
		max-height: 500px;
		opacity: 1;
		margin-top: var(--gd-hub-spacing-sm);
	}
}

/* ============================================================================
   Print styles
   ============================================================================ */

@media print {
	.gd-hub-sidebar,
	.gd-hub-content-types,
	.gd-hub-content-types-toggle {
		display: none;
	}

	.gd-hub-wrapper {
		grid-template-columns: 1fr;
	}

	.gd-hub-card {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid var(--gd-hub-border-light);
	}
}
