/**
 * Glovebox · Form Templates — base layout styles
 *
 * Structural rules only: layout primitives, reset list bullets, image
 * fluidity, basic spacing. Visual treatment (colors, typography, brand)
 * is owned by the theme. To customize structure, place override files
 * in `{theme}/glovebox-form-templates/`.
 */


/* ---------------------------------------------------------------------
 * Single template — main content + right sidebar
 *
 * Container width and padding are handled by the theme's existing
 * `.content-container.site-container` styles (Kadence/Sparkplug).
 * ------------------------------------------------------------------ */

.sd-gb-ft__hero {
	margin-bottom: 2.5rem;
}

.sd-gb-ft__layout {
	display: grid;
	grid-template-columns: 5fr 2fr;
	gap: 3.5rem;
}

@media ( max-width: 768px ) {
	.sd-gb-ft__layout {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* Heading ----------------------------------------------------------- */

.sd-gb-ft__header {

	.sd-gb-ft__title {
		margin-top: 0;
		margin-bottom: 0.1em;
	}

	.sd-gb-ft__tagline {
		margin-top: 0;
	}

}

/* Main column ------------------------------------------------------- */

.sd-gb-ft__thumbnail-wrap {
	margin-bottom: 1.5rem;
}

.sd-gb-ft__thumbnail {
	position: relative;
	display: block;
	overflow: hidden;
}

.sd-gb-ft__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 1;
	object-fit: cover;
	object-position: center top;
}

/* Linked thumbnail — hover/focus reveals a dark overlay (::before) plus
   the preview label (::after, centered, free to be styled like a button
   in the theme). Text content comes from the data-preview-label attr. */
.sd-gb-ft__thumbnail--linked {
	text-decoration: none;
}

/* Dark overlay layer */
.sd-gb-ft__thumbnail--linked::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.33 );
	opacity: 0;
	transition: opacity 0.25s ease;
}

/* Text layer — sized by content, centered. Theme can add padding,
   background, border, etc. to make it look like a button. */
.sd-gb-ft__thumbnail--linked::after {
	content: attr(data-preview-label);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	color: #fff;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sd-gb-ft__thumbnail--linked:hover::before,
.sd-gb-ft__thumbnail--linked:focus-visible::before,
.sd-gb-ft__thumbnail--linked:hover::after,
.sd-gb-ft__thumbnail--linked:focus-visible::after {
	opacity: 1;
}

.sd-gb-ft__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	padding: 1.5rem 0 3rem;

	a {
		flex: 0 1 42%;
	}
}

@media ( max-width: 768px ) {
	.sd-gb-ft__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}
	.sd-gb-ft__actions a {
		flex: 1 1 auto;
	}
}

/* Sidebar column ---------------------------------------------------- */

.sd-gb-ft__sidebar > * + * {
	margin-top: 3rem;
}


.sd-gb-ft__addons-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;

	li {
		display: flex;
	}
}

.sd-gb-ft__addon-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
}

.sd-gb-ft__addon-icon {
    display: flex;
	flex-shrink: 0;
}

.sd-gb-ft__addon-icon img {
	display: block;
	max-width: 100%;
	height: auto;
}

.sd-gb-ft__addon-name {
    line-height: 1.1;
    margin-top: 0.1em;
}

.sd-gb-ft__membership {
	background: var(--sprk-color-background);
    padding: var(--sprk-space-2) var(--sprk-space-3) var(--sprk-space-3);
    border-radius: var(--sprk-radius-base);
    border: 2px solid var(--sprk-color-border);
}

.sd-gb-ft__membership p {
    font-size: 0.9em;
}

.sd-gb-ft__categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sprk-space-1);
}

.sd-gb-ft__category {
	text-decoration: none;
}

/* ---------------------------------------------------------------------
 * Archive — 2-column layout with category sidebar
 *
 * Container width and padding are handled by the theme's existing
 * `.content-container.site-container` styles (Kadence/Sparkplug).
 * ------------------------------------------------------------------ */

/* Layout + sidebar primitives are owned by the theme (.nf-spark-sidenav-layout, .nf-spark-sidenav). */

.sd-gb-ft-archive__grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 1.5rem;
	align-content: start;
}

@media ( max-width: 768px ) {
	.sd-gb-ft-archive__grid {
		grid-template-columns: 1fr;
	}
}

.sd-gb-ft-card__thumbnail {
	display: block;
	text-decoration: none;
}

.sd-gb-ft-card__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 1;
	object-fit: cover;
	object-position: center top;
}

.sd-gb-ft-card__description {
	margin: 0;
}

.sd-gb-ft-archive__pagination {
	margin-top: 2rem;
}

.sd-gb-ft-archive__empty {
	margin: 2rem 0;
}
