/**
 * Utilities & Helpers — v3.2
 *
 * Mudanças v2.x → v3.2:
 *   - --space-sm/md/lg/xl (legados, inexistentes) → escala v3.2
 *   - Expandido: visibilidade, flex, grid, texto, cores semânticas
 *
 * Mapa de equivalência (para referência):
 *   --space-sm  ≈  --space-2  ( 8px)
 *   --space-md  ≈  --space-4  (16px)
 *   --space-lg  ≈  --space-6  (24px)
 *   --space-xl  ≈  --space-8  (32px)
 *
 * @package FocofyFactory
 * @version 3.2
 */

/* ══════════════════════════════════════════════════════════════════════════
   TEXTO
   ══════════════════════════════════════════════════════════════════════════ */

.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-justify { text-align: justify; }

.text-xs   { font-size: var(--font-size-xs); }
.text-sm   { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg   { font-size: var(--font-size-lg); }
.text-xl   { font-size: var(--font-size-xl); }

.fw-light     { font-weight: var(--fw-light); }
.fw-normal    { font-weight: var(--fw-normal); }
.fw-medium    { font-weight: var(--fw-medium); }
.fw-semibold  { font-weight: var(--fw-semibold); }
.fw-bold      { font-weight: var(--fw-bold); }
.fw-extrabold { font-weight: var(--fw-extrabold); }

.text-muted   { color: var(--color-text-muted); }
.text-inverse { color: var(--color-text-inverse); }
.text-accent  { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger  { color: var(--color-danger); }

.uppercase   { text-transform: uppercase; }
.capitalize  { text-transform: capitalize; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-word  { word-break: break-word; overflow-wrap: break-word; }
.no-select   { user-select: none; }

/* ══════════════════════════════════════════════════════════════════════════
   DISPLAY & VISIBILIDADE
   ══════════════════════════════════════════════════════════════════════════ */

.d-none    { display: none; }
.d-block   { display: block; }
.d-inline  { display: inline; }
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-contents { display: contents; }

.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;
}

@media (max-width: 767px)  { .hide-mobile  { display: none !important; } }
@media (min-width: 768px)  { .hide-tablet  { display: none !important; } }
@media (min-width: 1024px) { .hide-desktop { display: none !important; } }
@media (max-width: 1023px) { .show-desktop { display: none !important; } }

/* ══════════════════════════════════════════════════════════════════════════
   FLEX
   ══════════════════════════════════════════════════════════════════════════ */

.flex-row     { flex-direction: row; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-nowrap  { flex-wrap: nowrap; }
.flex-1       { flex: 1; }
.flex-auto    { flex: auto; }
.flex-none    { flex: none; }
.flex-shrink-0 { flex-shrink: 0; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-stretch  { align-items: stretch; }

.justify-start    { justify-content: flex-start; }
.justify-center   { justify-content: center; }
.justify-end      { justify-content: flex-end; }
.justify-between  { justify-content: space-between; }
.justify-around   { justify-content: space-around; }

/* ══════════════════════════════════════════════════════════════════════════
   GAP — escala v3.2
   ══════════════════════════════════════════════════════════════════════════ */

.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-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* Aliases semânticos NRB — mantidos para compatibilidade com seções v2.x */
.gap-sm { gap: var(--space-2); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }
.gap-xl { gap: var(--space-8); }

/* ══════════════════════════════════════════════════════════════════════════
   MARGIN-TOP — escala v3.2
   ══════════════════════════════════════════════════════════════════════════ */

.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

/* Aliases semânticos NRB */
.mt-sm { margin-top: var(--space-2); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }
.mt-xl { margin-top: var(--space-8); }

/* ══════════════════════════════════════════════════════════════════════════
   MARGIN-BOTTOM — escala v3.2
   ══════════════════════════════════════════════════════════════════════════ */

.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

/* Aliases semânticos NRB */
.mb-sm { margin-bottom: var(--space-2); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }
.mb-xl { margin-bottom: var(--space-8); }

/* ══════════════════════════════════════════════════════════════════════════
   PADDING
   ══════════════════════════════════════════════════════════════════════════ */

.p-0  { padding: 0; }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }

.px-4  { padding-left: var(--space-4);  padding-right: var(--space-4); }
.px-6  { padding-left: var(--space-6);  padding-right: var(--space-6); }
.px-8  { padding-left: var(--space-8);  padding-right: var(--space-8); }

.py-4  { padding-top: var(--space-4);   padding-bottom: var(--space-4); }
.py-6  { padding-top: var(--space-6);   padding-bottom: var(--space-6); }
.py-8  { padding-top: var(--space-8);   padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12);  padding-bottom: var(--space-12); }

/* ══════════════════════════════════════════════════════════════════════════
   BORDER RADIUS
   ══════════════════════════════════════════════════════════════════════════ */

.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-full { border-radius: var(--radius-full); }
.rounded-none { border-radius: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   LARGURAS
   ══════════════════════════════════════════════════════════════════════════ */

.w-full   { width: 100%; }
.w-auto   { width: auto; }
.max-w-sm { max-width: var(--container-narrow); }
.max-w-md { max-width: var(--container-max); }
.max-w-lg { max-width: var(--container-wide); }

/* ══════════════════════════════════════════════════════════════════════════
   OVERFLOW
   ══════════════════════════════════════════════════════════════════════════ */

.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-hidden { overflow-x: hidden; }

/* ══════════════════════════════════════════════════════════════════════════
   POSIÇÃO
   ══════════════════════════════════════════════════════════════════════════ */

.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   MISC
   ══════════════════════════════════════════════════════════════════════════ */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.pointer-events-none { pointer-events: none; }

.opacity-0   { opacity: 0; }
.opacity-50  { opacity: 0.5; }
.opacity-75  { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

.transition-base { transition: all var(--transition-base) ease; }
.transition-fast { transition: all var(--transition-fast) ease; }
.transition-none { transition: none; }