/**
 * SUNOSUNAO — UTILITY SYSTEM
 * File: public_html/assets/css/utilities.css
 *
 * PURPOSE
 * -------
 * Small, composable utility classes for spacing, sizing, alignment,
 * display, positioning, overflow, typography, interaction and state.
 *
 * ARCHITECTURE
 * ------------
 * - Depends on core.css
 * - Works with layout.css
 * - Works with components.css
 * - Works with theme.css
 * - Works with responsive.css
 * - Works with animations.css
 *
 * RULES
 * -----
 * - No story-specific content.
 * - No component-specific styling.
 * - No breakpoint-specific component ownership.
 * - No animation ownership.
 * - No JavaScript dependency.
 * - Uses canonical design tokens wherever possible.
 */

:root {
    --utility-transition: var(--motion-normal) var(--ease-standard);
}

/* =========================================================
   DISPLAY
   ========================================================= */

.u-block {
    display: block;
}

.u-inline {
    display: inline;
}

.u-inline-block {
    display: inline-block;
}

.u-flex {
    display: flex;
}

.u-inline-flex {
    display: inline-flex;
}

.u-grid {
    display: grid;
}

.u-hidden {
    display: none !important;
}

.u-contents {
    display: contents;
}

/* =========================================================
   FLEX
   ========================================================= */

.u-flex-row {
    flex-direction: row;
}

.u-flex-column {
    flex-direction: column;
}

.u-flex-wrap {
    flex-wrap: wrap;
}

.u-flex-nowrap {
    flex-wrap: nowrap;
}

.u-flex-1 {
    flex: 1 1 0;
}

.u-flex-auto {
    flex: 1 1 auto;
}

.u-flex-none {
    flex: none;
}

.u-grow {
    flex-grow: 1;
}

.u-grow-0 {
    flex-grow: 0;
}

.u-shrink {
    flex-shrink: 1;
}

.u-shrink-0 {
    flex-shrink: 0;
}

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

.u-items-start {
    align-items: flex-start;
}

.u-items-center {
    align-items: center;
}

.u-items-end {
    align-items: flex-end;
}

.u-items-stretch {
    align-items: stretch;
}

.u-items-baseline {
    align-items: baseline;
}

.u-justify-start {
    justify-content: flex-start;
}

.u-justify-center {
    justify-content: center;
}

.u-justify-end {
    justify-content: flex-end;
}

.u-justify-between {
    justify-content: space-between;
}

.u-justify-around {
    justify-content: space-around;
}

.u-justify-evenly {
    justify-content: space-evenly;
}

.u-self-start {
    align-self: flex-start;
}

.u-self-center {
    align-self: center;
}

.u-self-end {
    align-self: flex-end;
}

.u-self-stretch {
    align-self: stretch;
}

/* =========================================================
   GAP
   ========================================================= */

.u-gap-1 {
    gap: var(--space-1);
}

.u-gap-2 {
    gap: var(--space-2);
}

.u-gap-3 {
    gap: var(--space-3);
}

.u-gap-4 {
    gap: var(--space-4);
}

.u-gap-5 {
    gap: var(--space-5);
}

.u-gap-6 {
    gap: var(--space-6);
}

.u-gap-8 {
    gap: var(--space-8);
}

.u-gap-10 {
    gap: var(--space-10);
}

.u-gap-12 {
    gap: var(--space-12);
}

.u-gap-16 {
    gap: var(--space-16);
}

.u-gap-20 {
    gap: var(--space-20);
}

.u-gap-24 {
    gap: var(--space-24);
}

.u-gap-32 {
    gap: var(--space-32);
}

.u-column-gap-4 {
    column-gap: var(--space-4);
}

.u-column-gap-6 {
    column-gap: var(--space-6);
}

.u-column-gap-8 {
    column-gap: var(--space-8);
}

.u-column-gap-12 {
    column-gap: var(--space-12);
}

.u-row-gap-4 {
    row-gap: var(--space-4);
}

.u-row-gap-6 {
    row-gap: var(--space-6);
}

.u-row-gap-8 {
    row-gap: var(--space-8);
}

.u-row-gap-12 {
    row-gap: var(--space-12);
}

/* =========================================================
   MARGIN
   ========================================================= */

.u-m-0 {
    margin: 0 !important;
}

.u-m-auto {
    margin: auto !important;
}

.u-mt-0 {
    margin-top: 0 !important;
}

.u-mt-4 {
    margin-top: var(--space-4);
}

.u-mt-6 {
    margin-top: var(--space-6);
}

.u-mt-8 {
    margin-top: var(--space-8);
}

.u-mt-12 {
    margin-top: var(--space-12);
}

.u-mt-16 {
    margin-top: var(--space-16);
}

.u-mt-24 {
    margin-top: var(--space-24);
}

.u-mt-32 {
    margin-top: var(--space-32);
}

.u-mb-0 {
    margin-bottom: 0 !important;
}

.u-mb-4 {
    margin-bottom: var(--space-4);
}

.u-mb-6 {
    margin-bottom: var(--space-6);
}

.u-mb-8 {
    margin-bottom: var(--space-8);
}

.u-mb-12 {
    margin-bottom: var(--space-12);
}

.u-mb-16 {
    margin-bottom: var(--space-16);
}

.u-mb-24 {
    margin-bottom: var(--space-24);
}

.u-mb-32 {
    margin-bottom: var(--space-32);
}

.u-ml-auto {
    margin-left: auto;
}

.u-mr-auto {
    margin-right: auto;
}

.u-mx-auto {
    margin-inline: auto;
}

/* =========================================================
   PADDING
   ========================================================= */

.u-p-0 {
    padding: 0 !important;
}

.u-p-4 {
    padding: var(--space-4);
}

.u-p-6 {
    padding: var(--space-6);
}

.u-p-8 {
    padding: var(--space-8);
}

.u-p-12 {
    padding: var(--space-12);
}

.u-p-16 {
    padding: var(--space-16);
}

.u-p-24 {
    padding: var(--space-24);
}

.u-p-32 {
    padding: var(--space-32);
}

.u-px-4 {
    padding-inline: var(--space-4);
}

.u-px-6 {
    padding-inline: var(--space-6);
}

.u-px-8 {
    padding-inline: var(--space-8);
}

.u-px-12 {
    padding-inline: var(--space-12);
}

.u-px-16 {
    padding-inline: var(--space-16);
}

.u-py-4 {
    padding-block: var(--space-4);
}

.u-py-6 {
    padding-block: var(--space-6);
}

.u-py-8 {
    padding-block: var(--space-8);
}

.u-py-12 {
    padding-block: var(--space-12);
}

.u-py-16 {
    padding-block: var(--space-16);
}

.u-py-24 {
    padding-block: var(--space-24);
}

.u-py-32 {
    padding-block: var(--space-32);
}

/* =========================================================
   WIDTH
   ========================================================= */

.u-w-auto {
    width: auto;
}

.u-w-full {
    width: 100%;
}

.u-w-fit {
    width: fit-content;
}

.u-w-screen {
    width: 100vw;
}

.u-max-w-content {
    max-width: var(--content-max);
}

.u-max-w-wide {
    max-width: var(--content-wide);
}

.u-max-w-narrow {
    max-width: var(--content-narrow);
}

.u-max-w-none {
    max-width: none;
}

.u-min-w-0 {
    min-width: 0;
}

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

.u-h-auto {
    height: auto;
}

.u-h-full {
    height: 100%;
}

.u-h-screen {
    height: 100vh;
}

.u-min-h-screen {
    min-height: 100vh;
}

.u-min-h-dvh {
    min-height: 100dvh;
}

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

.u-relative {
    position: relative;
}

.u-absolute {
    position: absolute;
}

.u-fixed {
    position: fixed;
}

.u-sticky {
    position: sticky;
}

.u-static {
    position: static;
}

.u-inset-0 {
    inset: 0;
}

.u-top-0 {
    top: 0;
}

.u-right-0 {
    right: 0;
}

.u-bottom-0 {
    bottom: 0;
}

.u-left-0 {
    left: 0;
}

/* =========================================================
   OVERFLOW
   ========================================================= */

.u-overflow-hidden {
    overflow: hidden;
}

.u-overflow-auto {
    overflow: auto;
}

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

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

.u-overflow-visible {
    overflow: visible;
}

.u-no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.u-no-scrollbar::-webkit-scrollbar {
    display: none;
}

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

.u-text-left {
    text-align: left;
}

.u-text-center {
    text-align: center;
}

.u-text-right {
    text-align: right;
}

.u-text-balance {
    max-width: 65ch;
}

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

.u-nowrap {
    white-space: nowrap;
}

.u-break-word {
    overflow-wrap: anywhere;
}

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

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

.u-line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.u-line-clamp-4 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

/* =========================================================
   VISUAL
   ========================================================= */

.u-opacity-0 {
    opacity: 0;
}

.u-opacity-50 {
    opacity: 0.5;
}

.u-opacity-75 {
    opacity: 0.75;
}

.u-opacity-100 {
    opacity: 1;
}

.u-visible {
    visibility: visible;
}

.u-invisible {
    visibility: hidden;
}

/* =========================================================
   BORDER / RADIUS
   ========================================================= */

.u-border {
    border: 1px solid var(--color-border);
}

.u-border-0 {
    border: 0;
}

.u-border-top {
    border-top: 1px solid var(--color-border);
}

.u-border-bottom {
    border-bottom: 1px solid var(--color-border);
}

.u-rounded-sm {
    border-radius: var(--radius-sm);
}

.u-rounded-md {
    border-radius: var(--radius-md);
}

.u-rounded-lg {
    border-radius: var(--radius-lg);
}

.u-rounded-xl {
    border-radius: var(--radius-xl);
}

.u-rounded-full {
    border-radius: 999px;
}

/* =========================================================
   MEDIA
   ========================================================= */

.u-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.u-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.u-object-top {
    object-position: top;
}

.u-object-center {
    object-position: center;
}

.u-object-bottom {
    object-position: bottom;
}

/* =========================================================
   INTERACTION
   ========================================================= */

.u-pointer {
    cursor: pointer;
}

.u-default-cursor {
    cursor: default;
}

.u-not-allowed {
    cursor: not-allowed;
}

.u-pointer-events-none {
    pointer-events: none;
}

.u-pointer-events-auto {
    pointer-events: auto;
}

.u-select-none {
    user-select: none;
}

.u-select-text {
    user-select: text;
}

/* =========================================================
   TRANSITION
   ========================================================= */

.u-transition {
    transition:
        color var(--utility-transition),
        background-color var(--utility-transition),
        border-color var(--utility-transition),
        opacity var(--utility-transition),
        transform var(--utility-transition),
        box-shadow var(--utility-transition);
}

.u-transition-none {
    transition: none !important;
}

/* =========================================================
   ASPECT RATIO
   ========================================================= */

.u-aspect-square {
    aspect-ratio: 1;
}

.u-aspect-video {
    aspect-ratio: 16 / 9;
}

.u-aspect-portrait {
    aspect-ratio: 2 / 3;
}

/* =========================================================
   ACCESSIBILITY / STATE HELPERS
   ========================================================= */

.u-disabled {
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.u-loading {
    pointer-events: none;
    user-select: none;
}

.u-no-interaction {
    pointer-events: none;
}

/* =========================================================
   CONTENT VISIBILITY
   ========================================================= */

.u-content-auto {
    content-visibility: auto;
}

.u-content-visible {
    content-visibility: visible;
}

.u-contain-layout {
    contain: layout;
}

.u-contain-paint {
    contain: paint;
}

.u-contain-content {
    contain: content;
}

/* =========================================================
   SAFE AREA
   ========================================================= */

.u-safe-top {
    padding-top: env(safe-area-inset-top);
}

.u-safe-right {
    padding-right: env(safe-area-inset-right);
}

.u-safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

.u-safe-left {
    padding-left: env(safe-area-inset-left);
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
    .u-print-hidden {
        display: none !important;
    }

    .u-print-block {
        display: block !important;
    }

    .u-print-inline {
        display: inline !important;
    }
}