/*!
 * @be-partner-labs/ds v1.8.0 — components/footer
 * © 2026 Be Partner Labs. MIT License.
 *
 * CDN:  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@be-partner-labs/ds@1.8.0/dist/components/footer.min.css">
 * npm:  @import "@be-partner-labs/ds/components/footer";
 * Docs: https://ds.bepartnerlabs.com/components/footer/
 */
@layer bp-tokens, bp-reset, bp-grid, bp-components, bp-utilities;

@layer bp-components {
	/**
	 * .bp-footer
	 * Site footer using .bp-content-grid internally.
	 * Public API:
	 *   --footer-background      Background color
	 *   --footer-color   Text color
	 *   --footer-border  Top border
	 */
	.bp-footer {
		--_background: var(--footer-background, var(--bp-color-bg-subtle));
		--_color: var(--footer-color, var(--bp-color-text-muted));
		--_border: var(--footer-border, 1px solid var(--bp-color-border));

		background-color: var(--_background);
		color: var(--_color);
		border-top: var(--_border);
		font-size: var(--bp-text-sm);
	}

	.bp-footer__inner {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
		gap: var(--bp-space-10);
		padding-block: var(--bp-space-16);
		max-width: 90rem;
		margin-inline: auto;
		padding-inline: var(--bp-space-6);
	}

	.bp-footer__brand {
		display: flex;
		flex-direction: column;
		gap: var(--bp-space-4);
	}

	.bp-footer__logo {
		font-size: var(--bp-text-base);
		font-weight: var(--bp-font-weight-bold);
		color: var(--bp-color-text);
		text-decoration: none;
	}

	.bp-footer__logo:focus-visible {
		outline: none;
		box-shadow: var(--bp-focus-ring);
		border-radius: var(--bp-radius-sm);
	}

	.bp-footer__tagline {
		line-height: var(--bp-leading-normal);
	}

	.bp-footer__col-title {
		font-size: var(--bp-text-sm);
		font-weight: var(--bp-font-weight-semibold);
		color: var(--bp-color-text);
		margin-bottom: var(--bp-space-4);
	}

	.bp-footer__links {
		display: flex;
		flex-direction: column;
		gap: var(--bp-space-3);
	}

	.bp-footer__link {
		color: var(--_color);
		text-decoration: none;
		transition: color var(--bp-duration-fast) var(--bp-ease);
	}

	.bp-footer__link:hover {
		color: var(--bp-primary);
	}

	.bp-footer__link:focus-visible {
		outline: none;
		box-shadow: var(--bp-focus-ring);
		border-radius: var(--bp-radius-sm);
	}

	.bp-footer__bottom {
		border-top: 1px solid var(--bp-color-border);
		padding-block: var(--bp-space-6);
		max-width: 90rem;
		margin-inline: auto;
		padding-inline: var(--bp-space-6);
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: var(--bp-space-4);
	}

	/* Footer is its own container */
	.bp-footer {
		container-type: inline-size;
	}

	@container (inline-size > 0) {
		.bp-footer__logo {
			font-size: clamp(var(--bp-text-sm), 2cqi, var(--bp-text-base));
		}
		.bp-footer__col-title {
			font-size: clamp(var(--bp-text-xs), 1.8cqi, var(--bp-text-sm));
		}
		.bp-footer__link,
		.bp-footer__tagline {
			font-size: clamp(var(--bp-text-xs), 1.6cqi, var(--bp-text-sm));
		}
	}
}
