/**
 * ============================================================
 * UTILITIES.CSS – POMOCNÉ TRIEDY
 * ============================================================
 * Utility triedy pre rýchle štýlovanie
 * 
 * @version 1.0.0
 * @author EasyWay Team
 * @license MIT
 * ============================================================
 */

/* ============================================================
 * TEXT
 * ============================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-primary { color: var(--color-primary-500); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-info); }
.text-inverse { color: var(--color-text-inverse); }

.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); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-regular { font-weight: var(--font-weight-regular); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-wrap { white-space: normal; }
.text-nowrap { white-space: nowrap; }

/* ============================================================
 * BACKGROUND
 * ============================================================ */

.bg-primary { background: var(--color-primary-500); }
.bg-secondary { background: var(--color-bg-secondary); }
.bg-tertiary { background: var(--color-bg-tertiary); }
.bg-success { background: var(--color-success); }
.bg-error { background: var(--color-error); }
.bg-warning { background: var(--color-warning); }
.bg-info { background: var(--color-info); }
.bg-transparent { background: transparent; }

.bg-primary-light { background: var(--color-primary-50); }
.bg-success-light { background: rgba(34, 197, 94, 0.1); }
.bg-error-light { background: rgba(239, 68, 68, 0.1); }
.bg-warning-light { background: rgba(245, 158, 11, 0.1); }
.bg-info-light { background: rgba(59, 130, 246, 0.1); }

/* ============================================================
 * DISPLAY
 * ============================================================ */

.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-hidden { visibility: hidden; }

@media (min-width: 768px) {
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    .d-sm-flex { display: flex; }
}

@media (min-width: 1024px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
}

/* ============================================================
 * POSITION
 * ============================================================ */

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }
.z-auto { z-index: auto; }

/* ============================================================
 * BORDER
 * ============================================================ */

.border { border: 1px solid var(--color-border); }
.border-top { border-top: 1px solid var(--color-border); }
.border-right { border-right: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }
.border-left { border-left: 1px solid var(--color-border); }
.border-none { border: none; }

.border-primary { border-color: var(--color-primary-500); }
.border-success { border-color: var(--color-success); }
.border-error { border-color: var(--color-error); }
.border-warning { border-color: var(--color-warning); }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-base); }
.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); }

/* ============================================================
 * SHADOW
 * ============================================================ */

.shadow-none { box-shadow: none; }
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-base); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* ============================================================
 * WIDTH & HEIGHT
 * ============================================================ */

.w-full { width: 100%; }
.w-auto { width: auto; }
.w-screen { width: 100vw; }
.w-min { width: min-content; }
.w-max { width: max-content; }
.w-fit { width: fit-content; }

.h-full { height: 100%; }
.h-auto { height: auto; }
.h-screen { height: 100vh; }
.h-min { height: min-content; }
.h-max { height: max-content; }
.h-fit { height: fit-content; }

.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.max-w-full { max-width: 100%; }

/* ============================================================
 * OVERFLOW
 * ============================================================ */

.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ============================================================
 * CURSOR
 * ============================================================ */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-wait { cursor: wait; }
.cursor-text { cursor: text; }

/* ============================================================
 * OPACITY
 * ============================================================ */

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ============================================================
 * INTERACTIONS
 * ============================================================ */

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.user-select-none { user-select: none; }
.user-select-all { user-select: all; }
.user-select-auto { user-select: auto; }

/* ============================================================
 * SCREEN READER
 * ============================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: var(--spacing-2);
    margin: 0;
    overflow: visible;
    clip: auto;
}

/* ============================================================
 * DARK MODE
 * ============================================================ */

@media (prefers-color-scheme: dark) {
    .border { border-color: var(--color-border-dark); }
    .border-top { border-top-color: var(--color-border-dark); }
    .border-right { border-right-color: var(--color-border-dark); }
    .border-bottom { border-bottom-color: var(--color-border-dark); }
    .border-left { border-left-color: var(--color-border-dark); }

    .bg-secondary { background: var(--color-bg-secondary); }
    .bg-tertiary { background: var(--color-bg-tertiary); }
}