/**
 * layout.css — layout utility classes (r-39 f6).
 *
 * The app used the Tailwind CDN script only for these ~50 layout utilities.
 * f6 drops the script (not meant for production, and a third-party script
 * running in the app) and defines exactly the utilities in use here, under
 * the same names, so no markup had to change. Values come from the spacing,
 * radius and opacity scales in tokens.css.
 *
 * Rules:
 *   - Layout only: display, flex, gap, sizing, overflow, position, spacing.
 *     Colour, type, borders and shadows belong to the design-system classes.
 *   - The order below follows Tailwind's utility order (e.g. .hidden after
 *     .flex, .px-* after .p-*), because markup relies on which one wins.
 *   - Adding a utility means adding it here; scripts/check-layout-classes.js
 *     fails on any Tailwind-style class this file doesn't define.
 *
 * Linked last in <head> (after base.css), where the CDN used to inject its
 * styles, so these still win over same-specificity component rules.
 *
 * @see docs/architecture/ui-design-system.md §13 "Layout utilities and reset"
 */

/* ── Position ─────────────────────────────────────────── */
.absolute { position: absolute; }
.relative { position: relative; }
.top-4 { top: var(--space-4); }
.right-4 { right: var(--space-4); }
.z-10 { z-index: 10; }

/* ── Margin ───────────────────────────────────────────── */
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-8 { margin-bottom: var(--space-8); }
.ml-1 { margin-left: var(--space-1); }
.ml-auto { margin-left: auto; }
.mr-1 { margin-right: var(--space-1); }
.mr-2 { margin-right: var(--space-2); }
.mt-0\.5 { margin-top: calc(var(--space-1) / 2); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }

/* ── Display ──────────────────────────────────────────── */
.flex { display: flex; }
.hidden { display: none; }

/* ── Sizing ───────────────────────────────────────────── */
.h-12 { height: var(--space-12); }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-0 { min-height: 0; }
.w-5 { width: var(--space-5); }
.w-12 { width: var(--space-12); }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }

/* ── Flexbox ──────────────────────────────────────────── */
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-0\.5 { gap: calc(var(--space-1) / 2); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: var(--space-1); }
.self-start { align-self: flex-start; }

/* ── Overflow ─────────────────────────────────────────── */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ── Shape and media ──────────────────────────────────── */
.rounded-lg { border-radius: var(--radius-lg); }
.object-contain { object-fit: contain; }

/* ── Padding ──────────────────────────────────────────── */
.p-1 { padding: var(--space-1); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-7 { padding: calc(var(--space-6) + var(--space-1)); }
.p-8 { padding: var(--space-8); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.pb-5 { padding-bottom: var(--space-5); }

/* ── Text alignment and opacity ───────────────────────── */
.text-center { text-align: center; }
.opacity-20 { opacity: 0.2; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
