/* shell/sitefoot.css — the footer line on the grey canvas (template-parts/site-footer.php). */

.dba-sitefoot {
	container-type: inline-size;
	padding: 0 clamp(1rem, 2.4vw, 2.25rem);
	color: var(--dba-ink-soft);
	font-family: var(--dba-font-body);
	font-size: 0.875rem;
	line-height: 1.4;
}

/* One line, exactly as tall as the toolbar and as far from the bottom, so the two line up */
.dba-sitefoot__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	min-height: var(--dba-tb-h);
	max-width: var(--dba-frame-max);
	margin-inline: auto;
	margin-bottom: var(--dba-tb-gap);
}

/* A narrow canvas has no room beside the toolbar: the line then sits just above it */
@container (max-width: 55rem) {
	.dba-sitefoot__in {
		margin-bottom: calc(var(--dba-tb-h) + var(--dba-tb-gap) * 2);
	}
}

.dba-sitefoot__copy {
	margin: 0;
}

.dba-sitefoot__top {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.75rem;
	margin-left: auto; /* stays on the right even if it wraps */
	color: var(--dba-ink-soft);
	font-weight: 600;
	text-decoration: none;
}

.dba-sitefoot__top .dba-icon {
	width: 1rem;
	height: 1rem;
}

.dba-sitefoot__top:hover {
	color: var(--dba-ink);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* In the workspace: under the canvas column, with at most 80px of air above it */
.dba-shell .dba-main {
	min-height: calc(100vh - var(--dba-bar-h) - 5rem - var(--dba-tb-h) - var(--dba-tb-gap)); /* a short page still shows the footer */
	padding-bottom: 0;
}

.dba-shell .dba-sitefoot {
	grid-column: 2;
	grid-row: 2;
	margin-top: clamp(2.5rem, 6vw, 5rem);
}

.dba-shell .dba-layers {
	grid-row: 1 / span 2;
}

.dba-layers-closed .dba-shell .dba-sitefoot {
	grid-column: 1;
}

/* Preview and phones: the sections sit flush, so the footer brings its own grey strip */
.is-preview .dba-sitefoot {
	margin-top: 0;
	padding-block: 1rem;
	background: var(--dba-canvas);
}

.is-preview .dba-sitefoot__in {
	margin-bottom: 0;
}

@media (max-width: 56rem) {
	.dba-shell .dba-sitefoot {
		margin-top: 0;
		padding: 1rem 1rem 1.25rem;
		background: var(--dba-canvas);
		border-top: 1px solid var(--dba-line);
		font-size: 0.8125rem;
	}

	.dba-sitefoot__in {
		column-gap: 0.75rem;
		min-height: 0;
		margin-bottom: 0;
	}
}
