/* ============================================================
   TREZZON STORE — UTILITIES
   Used to replace common inline styles across templates.
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Display */
.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.grid          { display: grid; }
.block         { display: block; }
.inline-block  { display: inline-block; }
.hidden        { display: none; }

/* State-driven hide (used by JS toggling) — !important so it overrides
   inline display:flex/inline-block on the same element. Mirrors the
   convention already in dashboard.css / analytics.css / console.css. */
.is-hidden     { display: none !important; }

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

/* Gap */
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* Text alignment — flow-relative first, physical for explicit overrides */
.text-center { text-align: center; }
.text-start  { text-align: start; }   /* maps to left in LTR, right in RTL */
.text-end    { text-align: end; }     /* maps to right in LTR, left in RTL */
.text-left   { text-align: left; }    /* explicit physical (use sparingly) */
.text-right  { text-align: right; }   /* explicit physical (use sparingly) */

/* Width / height */
.w-full      { width: 100%; }
.h-full      { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Margin */
.mt-auto { margin-top: auto; }
.mx-auto { margin-inline: auto; }
.mb-2    { margin-bottom: var(--sp-2); }
.mb-3    { margin-bottom: var(--sp-3); }
.mb-4    { margin-bottom: var(--sp-4); }
.mb-5    { margin-bottom: var(--sp-5); }
.mb-6    { margin-bottom: var(--sp-6); }
.mt-2    { margin-top: var(--sp-2); }
.mt-4    { margin-top: var(--sp-4); }
.mt-6    { margin-top: var(--sp-6); }
.mt-8    { margin-top: var(--sp-8); }

/* Padding */
.p-3 { padding: var(--sp-3); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }
.p-6 { padding: var(--sp-6); }
.p-7 { padding: var(--sp-7); }

/* Text helpers */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-muted     { color: var(--txt-muted); }
.text-primary   { color: var(--clr-primary); }
.text-secondary { color: var(--txt-secondary); }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

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

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Backgrounds */
.bg-surface   { background: var(--bg-surface); }
.bg-surface-2 { background: var(--bg-surface-2); }
.bg-base      { background: var(--bg-base); }

/* Borders */
.border         { border: 1px solid var(--border-color); }
.border-color   { border-color: var(--border-color); }
.rounded-sm     { border-radius: var(--radius-sm); }
.rounded-md     { border-radius: var(--radius-md); }
.rounded-lg     { border-radius: var(--radius-lg); }
.rounded-full   { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* z-index */
.z-header   { z-index: var(--z-header); }
.z-dropdown { z-index: var(--z-dropdown); }
.z-modal    { z-index: var(--z-modal); }
.z-toast    { z-index: var(--z-toast); }
