/* ============================================================================
 * utilities.css  --  Single-responsibility utility classes
 *
 * Project: EFI / Experiencer Team -- unified UI shell
 * Owner:   /srv/efi-unified-ui/static/css/utilities.css
 * Served:  https://forum.experiencerteam.com/shared/css/utilities.css
 * Loaded:  LAST among shared stylesheets, before deployment-specific brand-*.css.
 *
 * --------------------------------------------------------------------------
 * Algorithm summary
 * --------------------------------------------------------------------------
 *   Each rule here changes EXACTLY ONE property so it can be applied
 *   compositionally without surprises. No utility names collide with
 *   existing apex or forum class names.
 *
 *   Catalog:
 *     1. Visibility           -- .sr-only, .visually-hidden, .hidden, .show-* / .hide-*
 *     2. Text alignment       -- .text-left/-center/-right
 *     3. Text emphasis        -- .text-muted, .text-faint, .text-strong, .text-uppercase, .text-italic
 *     4. Text size shortcuts  -- .text-xs..text-4xl (sets font-size)
 *     5. Font family          -- .font-display, .font-body, .font-chrome, .font-mono
 *     6. Font weight          -- .weight-light/-normal/-bold/-black
 *     7. Margin               -- .m-0..m-7, .mt/.mb/.ml/.mr/.mx/.my variants
 *     8. Padding              -- .p-0..p-7, .pt/.pb/.pl/.pr/.px/.py variants
 *     9. Flex helpers         -- .flex, .flex-col, .flex-center, .gap-*
 *    10. Width / max-width    -- .w-full, .w-auto, .mw-narrow/.mw-default/.mw-wide
 *    11. Color tints          -- .bg-card, .bg-strip, .bg-navy-pale, etc.
 *    12. Borders / radius     -- .rounded-{sm,md,lg,xl,pill,circle}, .border-{top,bottom,...}
 *    13. Shadow              -- .shadow-{sm,md,lg,card,none}
 *    14. Cursor              -- .cursor-pointer, .cursor-not-allowed
 *    15. Overflow            -- .overflow-hidden, .overflow-auto, .truncate
 *    16. Position             -- .relative, .absolute, .sticky, .top-0, etc.
 *
 *   These are LOW-specificity (single class selector) so they can be
 *   overridden by component rules easily. Only use !important where the
 *   guarantee is essential to the utility's purpose (e.g. .sr-only).
 * ============================================================================ */


/* --- 1. Visibility ----------------------------------------------------- */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.hidden { display: none !important; }

@media (max-width: 720px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 721px) {
  .show-mobile-only { display: none !important; }
}


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


/* --- 3. Text emphasis -------------------------------------------------- */
.text-muted   { color: var(--text-soft); }
.text-faint   { color: var(--text-faint); }
.text-strong  { color: var(--text); font-weight: var(--weight-bold); }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.04em; }
.text-italic  { font-style: italic; }
.text-no-decoration { text-decoration: none; }


/* --- 4. Text size shortcuts ------------------------------------------- */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }


/* --- 5. Font family ---------------------------------------------------- */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-chrome  { font-family: var(--font-chrome); }
.font-mono    { font-family: var(--font-mono); }


/* --- 6. Font weight ---------------------------------------------------- */
.weight-light  { font-weight: var(--weight-light); }
.weight-normal { font-weight: var(--weight-normal); }
.weight-bold   { font-weight: var(--weight-bold); }
.weight-black  { font-weight: var(--weight-black); }


/* --- 7. Margin --------------------------------------------------------- */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }
.m-7 { margin: var(--space-7); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.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-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-7); }

.ml-0 { margin-left: 0; }
.ml-auto { margin-left: auto; }
.mr-0 { margin-right: 0; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-3 { margin-top: var(--space-3); margin-bottom: var(--space-3); }
.my-5 { margin-top: var(--space-5); margin-bottom: var(--space-5); }


/* --- 8. Padding -------------------------------------------------------- */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-7 { padding: var(--space-7); }

.pt-0 { padding-top: 0; }
.pt-3 { padding-top: var(--space-3); }
.pt-5 { padding-top: var(--space-5); }
.pb-0 { padding-bottom: 0; }
.pb-3 { padding-bottom: var(--space-3); }
.pb-5 { padding-bottom: var(--space-5); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }


/* --- 9. Flex helpers --------------------------------------------------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-end    { display: flex; align-items: center; justify-content: flex-end; }
.flex-start  { display: flex; align-items: center; justify-content: flex-start; }
.flex-grow   { flex: 1 1 auto; }
.flex-shrink-0 { flex-shrink: 0; }
.align-start { align-items: flex-start; }
.align-end   { align-items: flex-end; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }


/* --- 10. Width / max-width -------------------------------------------- */
.w-full { width: 100%; }
.w-auto { width: auto; }
.mw-narrow  { max-width: var(--max-width-narrow); }
.mw-default { max-width: var(--max-width); }
.mw-wide    { max-width: var(--max-width-wide); }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }


/* --- 11. Color tints --------------------------------------------------- */
.bg-card       { background: var(--bg-card); }
.bg-strip      { background: var(--bg-strip); }
.bg-navy       { background: var(--navy); color: var(--text-on-navy); }
.bg-navy-deep  { background: var(--navy-deep); color: var(--text-on-navy); }
.bg-navy-pale  { background: var(--navy-pale); }
.bg-teal       { background: var(--teal); color: var(--text-on-navy); }
.bg-teal-pale  { background: var(--teal-pale); }
.bg-coral-soft { background: var(--coral-soft); }
.bg-green-soft { background: var(--green-soft); }
.bg-gold-soft  { background: var(--gold-soft); }
.bg-rule-soft  { background: var(--rule-soft); }

.color-navy       { color: var(--navy); }
.color-teal-deep  { color: var(--teal-deep); }
.color-coral      { color: var(--coral); }
.color-green-deep { color: var(--green-deep); }
.color-text-soft  { color: var(--text-soft); }


/* --- 12. Borders / radius --------------------------------------------- */
.rounded-xs    { border-radius: var(--radius-xs); }
.rounded-sm    { border-radius: var(--radius-sm); }
.rounded-md    { border-radius: var(--radius-md); }
.rounded-lg    { border-radius: var(--radius-lg); }
.rounded-xl    { border-radius: var(--radius-xl); }
.rounded-pill  { border-radius: var(--radius-pill); }
.rounded-circle { border-radius: var(--radius-circle); }

.border         { border: 1px solid var(--rule); }
.border-soft    { border: 1px solid var(--rule-soft); }
.border-top     { border-top: 1px solid var(--rule); }
.border-bottom  { border-bottom: 1px solid var(--rule); }
.border-left    { border-left: 1px solid var(--rule); }
.border-right   { border-right: 1px solid var(--rule); }
.border-none    { border: 0; }


/* --- 13. Shadow -------------------------------------------------------- */
.shadow-sm   { box-shadow: var(--shadow-sm); }
.shadow-md   { box-shadow: var(--shadow-md); }
.shadow-lg   { box-shadow: var(--shadow-lg); }
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-none { box-shadow: none; }


/* --- 14. Cursor -------------------------------------------------------- */
.cursor-pointer     { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-default     { cursor: default; }


/* --- 15. Overflow + truncate ----------------------------------------- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* --- 16. Position ------------------------------------------------------ */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.static   { position: static; }
.top-0    { top: 0; }
.right-0  { right: 0; }
.bottom-0 { bottom: 0; }
.left-0   { left: 0; }
.inset-0  { top: 0; right: 0; bottom: 0; left: 0; }

.z-base     { z-index: var(--z-base); }
.z-elevated { z-index: var(--z-elevated); }
.z-sticky   { z-index: var(--z-sticky); }
.z-nav      { z-index: var(--z-nav); }
.z-modal    { z-index: var(--z-modal); }
.z-toast    { z-index: var(--z-toast); }


/* End of utilities.css */
