/**
 * NovaPress — utilities.css
 * Single-purpose helper classes: spacing scale (built on --np-space),
 * text alignment/color, display/flex helpers, and visibility helpers.
 *
 * @package NovaPress
 */

/* -------------------------------------------------------------------------
 * Margin utilities (scale multiplies the --np-space base)
 * ---------------------------------------------------------------------- */
.np-m-0 { margin: 0; }
.np-m-1 { margin: calc(var(--np-space) * 0.5); }
.np-m-2 { margin: var(--np-space); }
.np-m-3 { margin: calc(var(--np-space) * 1.5); }
.np-m-4 { margin: calc(var(--np-space) * 2); }
.np-m-5 { margin: calc(var(--np-space) * 3); }

.np-mt-0 { margin-top: 0; }
.np-mt-1 { margin-top: calc(var(--np-space) * 0.5); }
.np-mt-2 { margin-top: var(--np-space); }
.np-mt-3 { margin-top: calc(var(--np-space) * 1.5); }
.np-mt-4 { margin-top: calc(var(--np-space) * 2); }
.np-mt-5 { margin-top: calc(var(--np-space) * 3); }

.np-mb-0 { margin-bottom: 0; }
.np-mb-1 { margin-bottom: calc(var(--np-space) * 0.5); }
.np-mb-2 { margin-bottom: var(--np-space); }
.np-mb-3 { margin-bottom: calc(var(--np-space) * 1.5); }
.np-mb-4 { margin-bottom: calc(var(--np-space) * 2); }
.np-mb-5 { margin-bottom: calc(var(--np-space) * 3); }

.np-mx-auto {
	margin-inline: auto;
}

/* -------------------------------------------------------------------------
 * Padding utilities
 * ---------------------------------------------------------------------- */
.np-p-0 { padding: 0; }
.np-p-1 { padding: calc(var(--np-space) * 0.5); }
.np-p-2 { padding: var(--np-space); }
.np-p-3 { padding: calc(var(--np-space) * 1.5); }
.np-p-4 { padding: calc(var(--np-space) * 2); }
.np-p-5 { padding: calc(var(--np-space) * 3); }

.np-pt-2 { padding-top: var(--np-space); }
.np-pt-4 { padding-top: calc(var(--np-space) * 2); }
.np-pb-2 { padding-bottom: var(--np-space); }
.np-pb-4 { padding-bottom: calc(var(--np-space) * 2); }

/* -------------------------------------------------------------------------
 * Text alignment
 * ---------------------------------------------------------------------- */
.np-text-center { text-align: center; }
.np-text-left { text-align: left; }
.np-text-right { text-align: right; }
.np-text-justify { text-align: justify; }

/* -------------------------------------------------------------------------
 * Text colour helpers
 * ---------------------------------------------------------------------- */
.np-text-primary { color: var(--np-color-primary); }
.np-text-secondary { color: var(--np-color-secondary); }
.np-text-accent { color: var(--np-color-accent); }
.np-text-muted { color: var(--np-color-muted); }
.np-text-inherit { color: inherit; }

.np-bg-primary { background-color: var(--np-color-primary); }
.np-bg-secondary { background-color: var(--np-color-secondary); }
.np-bg-accent { background-color: var(--np-color-accent); }
.np-bg-alt { background-color: color-mix(in srgb, var(--np-color-secondary) 4%, var(--np-color-bg)); }

.np-fw-normal { font-weight: 400; }
.np-fw-medium { font-weight: 500; }
.np-fw-bold { font-weight: 700; }

.np-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* -------------------------------------------------------------------------
 * Display helpers
 * ---------------------------------------------------------------------- */
.np-block { display: block; }
.np-inline { display: inline; }
.np-inline-block { display: inline-block; }
.np-hidden { display: none !important; }

/* -------------------------------------------------------------------------
 * Flexbox helpers
 * ---------------------------------------------------------------------- */
.np-flex { display: flex; }
.np-inline-flex { display: inline-flex; }
.np-flex-col { flex-direction: column; }
.np-flex-wrap { flex-wrap: wrap; }
.np-items-center { align-items: center; }
.np-items-start { align-items: flex-start; }
.np-items-end { align-items: flex-end; }
.np-justify-center { justify-content: center; }
.np-justify-between { justify-content: space-between; }
.np-justify-start { justify-content: flex-start; }
.np-justify-end { justify-content: flex-end; }
.np-gap-1 { gap: calc(var(--np-space) * 0.5); }
.np-gap-2 { gap: var(--np-space); }
.np-gap-3 { gap: calc(var(--np-space) * 1.5); }
.np-flex-1 { flex: 1 1 0%; }

/* -------------------------------------------------------------------------
 * Sizing helpers
 * ---------------------------------------------------------------------- */
.np-w-full { width: 100%; }
.np-max-w-prose { max-width: 65ch; }

/* -------------------------------------------------------------------------
 * Visibility helpers
 * ---------------------------------------------------------------------- */
.np-invisible { visibility: hidden; }
.np-visible { visibility: visible; }

/* Hide from sighted users but keep for screen readers (alias of base helper). */
.np-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Print-only / screen-only. */
@media print {
	.np-no-print { display: none !important; }
}
