/*
 * Layout only. Fonts, text sizes, colours, buttons and form styling inherit
 * from the active theme. Remove/disable this file if you prefer your own grid.
 */
.dialogix-resources-view {
	--dlg-resource-gap: clamp(1.25rem, 3vw, 3rem);
	--dlg-resource-section-space: clamp(2rem, 5vw, 4rem);
}

.dlg-resource-breadcrumbs,
.dlg-resource-back { margin-block-end: 2rem; }

.dlg-resource-archive-hero,
.dlg-resource-hero {
	/*display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(12rem, 1fr);
	gap: var(--dlg-resource-gap, 2rem);
	align-items: start;
	margin-block: var(--dlg-resource-section-space, 2rem);*/
	background-color: var(--ast-global-color-0);
	padding-top: 150px;
	margin-top: 0 !important
}
.dlg-resource-archive-hero h1, .dlg-resource-hero h1 {
	color:  var(--ast-global-color-4);
}
.dlg-resource-archive-hero p.dlg-resource-intro {
	margin-bottom: 0;
}
.dlg-resource-archive-hero-inner {
	padding-bottom: 50px;
	border-bottom: 1px solid var(--ast-global-color-4);
	width: 100%;
	color:  var(--ast-global-color-4);
}
.dlg-resource-archive-aside { align-self: center; }
.dlg-resource-hero-main,
.dlg-resource-results,
.dlg-resource-row-body,
.dlg-resource-related-list { min-width: 0; }

.dlg-resource-search {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding-block: 1.5rem;
	margin-block-end: 1.5rem;
	border-block: 1px solid currentColor;
}
.dlg-resource-search input[type="search"] { flex: 1 1 15rem; min-width: 0; width: auto; }
.dlg-resource-search button { flex: 0 0 auto; }
.dlg-resource-browser {
	margin-bottom: 40px
}

.dlg-resource-related {
	background-color: var(--ast-global-color-5)
}/*
.dlg-resource-filters {
	display: flex;
	flex-direction: column;
	border-inline-end: 1px solid currentColor;
	padding-inline-end: var(--dlg-resource-gap, 2rem);
}*/
.dlg-resource-filters fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.dlg-resource-filters legend { margin-block-end: .75rem; }
.dlg-resource-filters .dlg-resource-filter-list { list-style: none; padding: 0; margin: 0; }
.dlg-resource-filters .dlg-resource-filter-list .dlg-resource-filter-list {
	margin-block-start: 0.75rem;
	padding-inline-start: 1.5rem;
}
.dlg-resource-filter-list li + li { margin-block-start: .75rem; }
.dlg-resource-filter-list label { display: flex; align-items: baseline; gap: .65rem; cursor: pointer; }
.dlg-resource-filter-list input { flex: 0 0 auto; }
.dlg-resource-filter-actions { display: grid; gap: 1rem; justify-items: start; }
.dlg-resource-filters {
	/* Change these two variables to customise the selected controls. */
	--dlg-control-accent: var(--ast-global-color-0, #111);
	--dlg-control-mark: #fff;
	--dlg-control-size: 1.15rem;
}

/* Shared checkbox and radio appearance. */
.dlg-resource-filters input[type="checkbox"],
.dlg-resource-filters input[type="radio"] {
	-webkit-appearance: none;
	appearance: none;

	display: inline-grid;
	place-content: center;
	box-sizing: border-box;

	width: var(--dlg-control-size);
	height: var(--dlg-control-size);
	flex: 0 0 var(--dlg-control-size);
	margin: 0;

	color: inherit;
	background: transparent;
	border: 1.5px solid currentColor;
	box-shadow: none;
	cursor: pointer;

	transition:
		background-color 150ms ease,
		border-color 150ms ease;
}

/* Squares for checkboxes; circles for radios. */
.dlg-resource-filters input[type="checkbox"] {
	border-radius: 0.2rem;
}

.dlg-resource-filters input[type="radio"] {
	border-radius: 50%;
}

/* Hover and selected states. */
.dlg-resource-filters input[type="checkbox"]:hover:not(:disabled),
.dlg-resource-filters input[type="radio"]:hover:not(:disabled) {
	border-color: var(--dlg-control-accent);
}

.dlg-resource-filters input[type="checkbox"]:checked,
.dlg-resource-filters input[type="radio"]:checked {
	background-color: var(--dlg-control-accent);
	border-color: var(--dlg-control-accent);
}

/* The checkmark / radio dot. */
.dlg-resource-filters input[type="checkbox"]::before,
.dlg-resource-filters input[type="radio"]::before {
	content: "";
	display: block;
	opacity: 0;
	transition: opacity 150ms ease;
}

.dlg-resource-filters input[type="checkbox"]::before {
	width: 0.55rem;
	height: 0.3rem;
	margin-top: -0.15rem;
	border-left: 2px solid var(--dlg-control-mark);
	border-bottom: 2px solid var(--dlg-control-mark);
	transform: rotate(-45deg);
}

.dlg-resource-filters input[type="radio"]::before {
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background-color: var(--dlg-control-mark);
}

.dlg-resource-filters input[type="checkbox"]:checked::before,
.dlg-resource-filters input[type="radio"]:checked::before {
	opacity: 1;
}

/* Keep keyboard navigation clearly visible. */
.dlg-resource-filters input[type="checkbox"]:focus-visible,
.dlg-resource-filters input[type="radio"]:focus-visible {
	outline: 2px solid var(--dlg-control-accent);
	outline-offset: 3px;
}

/* Disabled controls. */
.dlg-resource-filters input[type="checkbox"]:disabled,
.dlg-resource-filters input[type="radio"]:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Respect the user's system high-contrast colours. */
@media (forced-colors: active) {
	.dlg-resource-filters {
		--dlg-control-accent: Highlight;
		--dlg-control-mark: HighlightText;
	}

	.dlg-resource-filters input[type="checkbox"],
	.dlg-resource-filters input[type="radio"] {
		forced-color-adjust: none;
		color: CanvasText;
		background-color: Canvas;
	}

	.dlg-resource-filters input[type="checkbox"]:checked,
	.dlg-resource-filters input[type="radio"]:checked {
		background-color: Highlight;
		border-color: Highlight;
	}
}
.dlg-resource-browse-note { margin-block: auto 0; padding-block-start: 3rem; }

.dlg-resource-results-toolbar,
.dlg-resource-sort,
.dlg-resource-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}
.dlg-resource-results-toolbar { justify-content: space-between; margin-block-end: 1rem; }
.dlg-resource-count { margin: 0; }
.dlg-resource-sort select { width: auto; max-width: 100%; }
.dlg-resource-actions { margin-block: 1.5rem 1rem; }
.dlg-resource-list, .dlg-resource-related-list {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
}
.dialogix-resources-view article.dlg-resource-row,
.dlg-resource-related-list article.dlg-resource-row,
.dlg-resource-shortcode-grid article.dlg-resource-row {
	display: flex;
	flex-direction: column;
	padding: 0;
	margin: 0;
	border: 0;
	width: 100%;
	flex: 0 0 calc((100% - 80px) / 3);
	gap: 1rem;	
	background: var(--ast-global-dark-lfs);
	box-shadow: 0 0 30px 0 rgba(0,0,0,.15);
	-webkit-box-shadow: 0 0 30px 0 rgba(0,0,0,.15);
	-moz-box-shadow: 0 0 30px 0 rgba(0,0,0,.15);
}
.dlg-resource-row-img {
	position: relative;
	background: var(--ast-global-color-5);
}
.dlg-resource-row-img .dlg-resource-eyebrow {
	position: absolute;
	top: 20px;
	left: 20px;
}
.dlg-resource-row-img img {
/*	height: 210px !important;
	object-fit: contain !important */
}
.dlg-resource-row p { margin-block: 0 .5rem;  font-size: .75rem}
.dlg-resource-course-row-meta {
	background: var(--ast-global-color-5);
	padding: 3px 10px;
	display: inline-block;
}
.dlg-resource-row-body {
	padding: 0 1rem 1rem
}
.dlg-resource-row p:last-child { margin-block-end: 0; }
.dlg-resource-row-title { margin-block: 0rem; font-size: 1rem}
.dlg-resource-row-title a { color: var(--ast-global-color-2)}
.dlg-resource-row-link { white-space: nowrap; }
.dlg-resource-pagination { margin-block-start: 2rem; }
.dlg-resource-pagination ul.page-numbers { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; margin: 0; }

.dlg-resource-facts dl { margin: 0; }
.dlg-resource-facts dl > div { padding-block: 1.25rem; border-block-start: 1px solid currentColor; }
.dlg-resource-facts dl > div:last-child { border-block-end: 1px solid currentColor; }
.dlg-resource-facts dd { margin: .5rem 0 0; }

.dlg-resource-section {
	padding-block: 1.5rem;
	margin-block-start: var(--dlg-resource-section-space, 3rem);
}
.dlg-resource-section.wp-block-columns { gap: var(--dlg-resource-gap, 2rem); }
.dlg-resource-section .wp-block-column { min-width: 0; }
.dlg-resource-section img { max-width: 100%; height: auto; }
.dlg-resource-section .wp-block-file { overflow-wrap: anywhere; }
.dlg-resource-content { min-width: 0; }
/* Full/wide blocks fill this template's container without Astra's negative gutters. */
body.dialogix-resources-view .dlg-resource-content.entry-content > :is(.alignwide, .alignfull) {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
	left: auto;
}
.dlg-resource-content iframe,
.dlg-resource-content video { max-width: 100%; }
.dlg-resource-content [id] { scroll-margin-block-start: 2rem; }

.dlg-resource-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--dlg-resource-gap, 2rem);
	padding: var(--dlg-resource-gap, 2rem);
	margin-block-start: var(--dlg-resource-section-space, 3rem);
	background: var(--ast-global-color-0);
}
.dlg-resource-cta > h2 { flex: 1 1 18rem; margin: 0; }
.dlg-resource-cta > .dlg-resource-eyebrow { align-self: flex-start; }
.dlg-resource-cta-action { flex: 1 1 15rem; }
.dlg-resource-cta-action > :last-child { margin-block-end: 0; }
.dlg-resource-cta-action .ast-button + p { margin-block-start: 1rem; }

@media (max-width: 781px) {
	.dlg-resource-archive-hero,
	.dlg-resource-hero,
	.dlg-resource-browser,
	.dlg-resource-related { grid-template-columns: minmax(0, 1fr); }
	.dlg-resource-filters { border-inline-end: 0; border-block-end: 1px solid currentColor; padding-inline-end: 0; padding-block-end: 1.5rem; }
	.dlg-resource-browse-note { padding-block-start: 1.5rem; }
	.dlg-resource-cta { padding-inline: 0; }
}

@media (max-width: 480px) {
	.dialogix-resources-view article.dlg-resource-row { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
	.dlg-resource-row-link { justify-self: start; }
	.dlg-resource-search input[type="search"] { flex-basis: 100%; }
	.dlg-resource-sort { gap: .5rem; }
}

/* AJAX controls inherit the theme's typography, colours and button styles. */
.dlg-resource-archive [hidden] { display: none !important; }
.dlg-resource-live-status:empty { display: none; }
.dlg-resource-live-status { margin-block: 1rem; }
.dlg-resource-load-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem; }
.dlg-resource-error { margin-block: 1rem; }
.dlg-resource-error button { margin-inline-end: 1rem; }
.dlg-resource-scroll-sentinel { height: 1px; }
.dlg-resource-result-content[aria-busy="true"] { cursor: progress; }

/* Access badges stay inside the existing eyebrow and inherit its typography. */
.dlg-resource-eyebrow--tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; font-size: .75rem }
.dlg-resource-eyebrow--tags span:not([aria-hidden="true"]) {  padding: .1em .5em; white-space: nowrap;  border: 0px solid var(--ast-global-color-0); background: var(--ast-global-color-4) }
.dlg-resource-badge { display: inline-block; padding: .1em .5em; border: none !important; white-space: nowrap; background: var(--ast-global-color-0); color: var(--ast-global-color-4)}
.dlg-resource-badge--free {background: var(--ast-global-color-1); border: none; color: var(--ast-global-color-2)}

/* Course navigation and contents: structure only; theme colours/type inherit. */
.dlg-resource-course-intro { margin-block-end: var(--dlg-resource-section-space, 3rem); }
.dlg-resource-course-context {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.25rem;
	margin-block: 0 2rem;
	border-block: 1px solid currentColor;
}
.dlg-resource-course-context p { margin-block: 0 .5rem; }
.dlg-resource-course-context p:last-child { margin-block-end: 0; }
.dlg-resource-course-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--dlg-resource-gap, 2rem); margin-block: 2rem; }
.dlg-resource-course-step { border-block-start: 1px solid currentColor; padding-block-start: 1rem; min-width: 0; }
.dlg-resource-course-step > a { display: grid; gap: .5rem; }
.dlg-resource-course-step--next { text-align: end; }
.dlg-resource-course-part { border-top: 1px solid currentColor }
.dlg-resource-course-part:last-of-type { border-bottom: 1px solid currentColor;}
.dlg-resource-course-part > summary { cursor: pointer; padding-block: 1rem; font-weight: 700 }
.dlg-resource-course-step strong { overflow-wrap: anywhere; }
.dlg-resource-course-contents { scroll-margin-block-start: 2rem; border: none !important; background: var(--ast-global-color-5); margin-block: 0 !important; padding-block: var(--dlg-resource-section-space, 3rem); }
@media (max-width: 600px) {
	.dlg-resource-course-steps { grid-template-columns: minmax(0, 1fr); }
	.dlg-resource-course-step--next { text-align: start; }
}

/* Course discovery on the main archive. Placement visibility is controlled in PHP. */
.dlg-resource-course-panels {
	width: 100%;
	min-width: 0;  
	background-color: var(--ast-global-color-0); 
	padding: clamp(1rem, 2.5vw, 2rem); 
}
.dlg-resource-course-promotion {}
.dlg-resource-course-promotion > :first-child { margin-block-start: 0; }
.dlg-resource-course-promotion > :last-child { margin-block-end: 0; }
.dlg-resource-course-promotion h2, .dlg-resource-course-promotion h3 {font-size: 1.5rem;}
.dlg-resource-course-promotion p {color: var(--ast-global-color-4) }
.dlg-resource-course-promotion .dlg-resource-actions { margin-block-end: 0; }
.dlg-resource-course-promotion .dlg-resource-course-path { display: flex; flex-direction: column; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.dlg-resource-course-path > li { min-width: 0; padding-block-end: 1rem; border-block-end: 1px solid var(--ast-global-color-4); }
.dlg-resource-course-discovery-contents {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--dialogix-column-gap, clamp(1.5rem, 4vw, 4rem));
	align-items: start;
	margin-block-start: 1.5rem !important;
	border-top: 1px solid var(--ast-global-color-4);
	padding-top: 1.5rem;
}
.dlg-resource-course-path a { display: grid; gap: .5rem; overflow-wrap: anywhere; color: var(--ast-global-color-3)}
.dlg-resource-course-path a span {font-size: .75rem}
.dlg-resource-course-card-parts > summary { cursor: pointer; padding-block: .5rem; }
.dlg-resource-course-promotion--cards .dlg-resource-course-path { grid-template-columns: minmax(0, 1fr); }
.dlg-resource-selected-course { margin-block: 1rem; padding: 1rem; background: var(--ast-global-color-5);  font-size: .75rem}
.dlg-resource-selected-course p { margin-block: 0 .5rem;}
.dlg-resource-course-row-part,
.dlg-resource-course-sequence-link { display: block; margin-block-start: .25rem; }
.dlg-resource-count { scroll-margin-block-start: 2rem; }
.dlg-resource-series-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem 2rem;

	margin-block: 2rem;
	padding: clamp(1.25rem, 3vw, 2rem);

	border: 1px solid var(--ast-border-color, currentColor);
	border-inline-start: 4px solid var(--ast-global-color-0, currentColor);
}

.dlg-resource-series-banner__content {
	display: grid;
	gap: 0.65rem;
	flex: 1 1 22rem;
	min-width: 0;
}

.dlg-resource-series-banner__content > p,
.dlg-resource-series-banner__content > h2 {
	margin: 0;
}

.dlg-resource-series-banner__content > h2 {
	overflow-wrap: anywhere;
}

.dlg-resource-series-banner__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;

	flex: 0 1 auto;
	max-width: 100%;
	margin: 0;

	white-space: normal;
	text-align: center;
}

.dlg-resource-series-banner__download > span {
	flex-shrink: 0;
}

/* Resource sections inside the editable Page. */
.dlg-resource-shortcode-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	gap: clamp(1.25rem, 3vw, 2.5rem);
}
.dlg-resource-shortcode-grid .dlg-resource-row-title {
	font-size: 1rem;
	overflow-wrap: anywhere;
}
.dlg-resource-shortcode-grid .dlg-resource-row-img:not(:has(img)) .dlg-resource-eyebrow {
	position: static;
	margin: 0;
	padding: .75rem 1rem;
}
.dlg-resource-shortcode-course,
.dlg-resource-shortcode-course .dlg-resource-course-part {
	scroll-margin-block-start: 5rem;
}
.dlg-resource-shortcode-course .dlg-resource-actions {
	align-items: center;
}
.dlg-resource-shortcode-course {
	width: 100%;
	min-width: 0;
}
.dlg-resource-shortcode-course .dlg-resource-course-part > .dlg-resource-shortcode-grid {
	padding-block: .25rem 1.5rem;
}
.dlg-resource-shortcode-course .dlg-resource-row.is-current {
	outline: 2px solid var(--ast-global-color-0, currentColor);
	outline-offset: -2px;
}

/* Editorial heading and filters: scoped to the archive's resource library only. */
.dlg-resource-archive > .dlg-resource-library {
	--dlg-library-columns: minmax(0, 1fr) minmax(0, 3fr);
	--dlg-library-column-gap: var(--dialogix-column-gap, clamp(1.5rem, 4vw, 4rem));
	display: block;
	padding-block-start: clamp(2rem, 5vw, 4rem);
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-library-heading {
	display: grid;
	grid-template-columns: var(--dlg-library-columns);
	column-gap: var(--dlg-library-column-gap);
	align-items: start;
	margin-block-end: 2rem;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-library-label {
	margin: .4rem 0 0;
	font-size: .65rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-library-title {
	margin: 0;
	font-size: clamp(2rem, 3.5vw, 2.5rem);
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-browser > .dlg-resource-filters {
	display: grid;
	grid-template-columns: var(--dlg-library-columns);
	column-gap: var(--dlg-library-column-gap);
	border: 0;
	padding: 0;
	margin-block-end: 2rem;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filters > form,
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filters > .dlg-resource-browse-note {
	grid-column: 2;
	min-width: 0;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group {
	margin: 0 0 1.5rem;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group > legend {
	display: block;
	width: 100%;
	padding: 0;
	margin-block-end: .75rem;
	font-size: .75rem;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group > .dlg-resource-filter-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(1.25rem, 3vw, 2.5rem);
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group > .dlg-resource-filter-list > li {
	min-width: 0;
	margin: 0;
	border-block-start: 1px solid var(--ast-global-color-3);
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group > .dlg-resource-filter-list > li > label {
	align-items: center;
	min-height: 3.25rem;
	padding-block: .75rem;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.5;
}
.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group > .dlg-resource-filter-list > li > label > span {
	min-width: 0;
	overflow-wrap: anywhere;
}
@media (max-width: 781px) {
	.dlg-resource-archive > .dlg-resource-library {
		--dlg-library-columns: minmax(0, 1fr);
	}
	.dlg-resource-archive > .dlg-resource-library .dlg-resource-library-heading {
		row-gap: .75rem;
	}
	.dlg-resource-archive > .dlg-resource-library .dlg-resource-library-label {
		margin-block-start: 0;
	}
	.dlg-resource-archive > .dlg-resource-library .dlg-resource-filters > form,
	.dlg-resource-archive > .dlg-resource-library .dlg-resource-filters > .dlg-resource-browse-note {
		grid-column: 1;
	}
}
@media (max-width: 600px) {
	.dlg-resource-archive > .dlg-resource-library .dlg-resource-filter-group > .dlg-resource-filter-list {
		grid-template-columns: minmax(0, 1fr);
	}
	.dlg-resource-hero {
		padding-bottom: 30px
	}
	.dlg-resource-related-list article.dlg-resource-row {
		flex: 0 0 100%
	}
}
