/**
 * Utility Classes — Shared Foundation
 *
 * RULES:
 * - NO Bootstrap utility class names (d-flex, d-none, col-md-*, mt-*, px-*, etc.)
 * - NO Tailwind utility class names (flex-col, items-center, bg-gray-*, text-sm, etc.)
 * - Use SEMANTIC class names that describe WHAT the element IS, not HOW it looks
 * - Write actual CSS in component files: .my-component { display: flex; margin-top: 1rem; }
 *
 * This file contains ONLY project-semantic helper classes.
 */

/* === DISPLAY HELPERS — Semantic names === */

.hidden          { display: none !important; }
.visible         { visibility: visible; }
.invisible       { visibility: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }

/* === POSITION HELPERS === */

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed    { position: fixed; }
.position-sticky   { position: sticky; top: 0; }

/* === TEXT ALIGNMENT === */

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

/* === CURSOR === */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* === WIDTH/HEIGHT HELPERS === */

.width-full  { width: 100%; }
.height-full { height: 100%; }
.min-height-full { min-height: 100%; }
.min-height-screen { min-height: 100vh; }

/* === FLEX LAYOUT HELPERS — semantic names === */

.layout-flex         { display: flex; }
.layout-grid         { display: grid; }
.layout-inline-flex  { display: inline-flex; }
.layout-flex-col     { display: flex; flex-direction: column; }
.layout-flex-wrap    { display: flex; flex-wrap: wrap; }
.layout-flex-center  { display: flex; align-items: center; justify-content: center; }
.layout-flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-grow-1         { flex-grow: 1; }
.flex-shrink-0       { flex-shrink: 0; }
.flex-1              { flex: 1; }
.ml-auto             { margin-left: auto; }
.mr-auto             { margin-right: auto; }
.mx-auto             { margin-left: auto; margin-right: auto; }

/* === Z-INDEX SCALE === */

.z-index-base     { z-index: 1; }
.z-index-dropdown { z-index: 100; }
.z-index-sticky   { z-index: 200; }
.z-index-modal    { z-index: 1000; }
.z-index-overlay  { z-index: 1100; }
.z-index-toast    { z-index: 1200; }

/* === TRUNCATION / TEXT OVERFLOW === */

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* === SCREEN READER ONLY === */

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

/* === BORDER HELPERS === */

.no-border    { border: none; }
.rounded-sm   { border-radius: var(--radius-base, 6px); }
.rounded-xs   { border-radius: var(--radius-sm, 4px); }
.rounded-large { border-radius: var(--radius-lg, 10px); }
.rounded-full { border-radius: 9999px; }

/* === ELEVATION / SHADOW HELPERS === */

.elevation-none { box-shadow: none; }
.elevation-sm   { box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.08)); }
.elevation-base { box-shadow: var(--shadow-base, 0 2px 8px rgba(0,0,0,0.12)); }
.elevation-lg   { box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.15)); }

/* === SPONZY CORE COMPATIBILITY CLASSES ===
 * These classes are used in Sponzy core include files.
 * Defined here to provide actual CSS backing.
 * Pure CSS — semantic intent preserved.
 */

/* Centers content both text and flex */
.text-flex-align-center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Flex row with space-between alignment */
.flex-justify-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Flex row with center alignment */
.flex-justify-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flex with vertical center alignment only */
.flex-align-center {
    display: flex;
    align-items: center;
}

/* Flex row variant with space-between */
.flex-direction-row-between {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* === BOX SHADOW UTILITIES — Missing classes added ===
 * box-shadow-sm is used throughout the codebase as a semantic panel shadow helper.
 * These aliases ensure backward compatibility with existing markup.
 */

.box-shadow-sm   { box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.10)); }
.box-shadow-md   { box-shadow: var(--shadow-base, 0 2px 8px rgba(0,0,0,0.12)); }
.box-shadow-lg   { box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.15)); }
.shadow-custom   { box-shadow: 0 2px 12px rgba(0,0,0,0.10); }
.shadow-none     { box-shadow: none; }

/* === BORDER UTILITIES === */

.border-0        { border: none !important; }
.border-top-0    { border-top: none !important; }
.border-bottom-0 { border-bottom: none !important; }
.border-start    { border-left: 1px solid var(--border-color, #e5e7eb); }
.border-end      { border-right: 1px solid var(--border-color, #e5e7eb); }
.border-4        { border-width: 4px; }
.border-color-danger  { border-color: var(--color-danger, #dc3545); }
.border-color-success { border-color: var(--color-success, #198754); }
.border-color-warning { border-color: var(--color-warning, #ffc107); }
.border-color-primary { border-color: var(--color-primary, #6366f1); }
.border-edge-none     { border: none; }

/* === HEIGHT UTILITIES === */

.height-100  { height: 100%; }
.height-auto { height: auto; }
.height-full { height: 100vh; }

/* === PADDING UTILITIES — Sponzy core compat ===
 * paddingap-N are custom spacing helpers from the original Sponzy theme.
 * Defined here with real CSS values to match the numeric scale.
 */

.paddingap-0 { padding: 0; }
.paddingap-1 { padding: 0.25rem; }
.paddingap-2 { padding: 0.5rem; }
.paddingap-3 { padding: 1rem; }
.paddingap-4 { padding: 1.5rem; }
.paddingap-5 { padding: 3rem; }

/* margin-topaddingap is a concatenation typo from original Sponzy — keep for compat */
.margin-topaddingap-3 { margin-top: 1rem; }

/* === DISPLAY UTILITIES (missing) === */

.display-none  { display: none !important; }
.display-nonea { display: none; }
.display-block { display: block; }
.display-flex  { display: flex; }

/* === MISC UTILITY GAPS === */

.margin-0       { margin: 0; }
.margin-bottom-md  { margin-bottom: 1rem; }
.margin-bottom-lgap-0 { margin-bottom: 0; }
.font-12        { font-size: 0.75rem; }
.height-100     { height: 100%; }
.align-bottom   { vertical-align: bottom; }
.e-none         { pointer-events: none; }
