/* ============================================================
   SIGSPA-ASSPAFC — UTILITIES
   Classes utilitárias reutilizáveis (Mobile First).
   ============================================================ */

/* ---------- Flexbox helpers ---------- */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-wrap-gap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Espaçamento (escala própria, BS4 não tem gap) ---------- */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ---------- Texto ---------- */
.text-2xs { font-size: 10.5px; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-md { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; }

.text-muted-2 { color: var(--gray-400); }
.text-muted-3 { color: var(--gray-500); }

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Largura ---------- */
.w-auto { width: auto !important; }
.w-100 { width: 100% !important; }
.min-w-0 { min-width: 0 !important; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 36rem; }
.max-w-xl { max-width: 48rem; }

/* Inputs flexíveis (substitui width fixa em selects de filtro) */
.input-fluid {
    width: 100% !important;
    max-width: 260px;
    min-width: 0 !important;
}

/* ---------- Scroll horizontal seguro ---------- */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.overflow-hidden {
    overflow: hidden;
}

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

/* ---------- Bordas / sombras ---------- */
.radius-sm { border-radius: var(--radius-sm); }
.radius-md { border-radius: var(--radius-md); }
.radius-lg { border-radius: var(--radius-lg); }

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

/* ---------- Visibilidade por breakpoint ---------- */
.d-md-none { display: none !important; }
.d-md-block { display: block !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
}

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

/* ---------- Animação de entrada ---------- */
.fade-in {
    animation: utilFadeIn var(--dur-med) var(--ease-out);
}

@keyframes utilFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] .text-muted-2,
[data-theme="dark"] .text-muted-3 {
    color: var(--gray-500);
}
