/* ========================================
   FABSOFT UTILITIES & ANIMATIONS
   fabsoft-utilities.css
   
   Utility classes, animations, and helpers
   Requires: fabsoft-variables.css
   ======================================== */

/* ----------------------------------------
   ANIMATIONS - KEYFRAMES
   ---------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ----------------------------------------
   ANIMATION CLASSES
   ---------------------------------------- */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Animation delays */
.delay-100 {
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.delay-200 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.delay-300 {
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.delay-400 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.delay-500 {
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

/* ----------------------------------------
   DISPLAY UTILITIES
   ---------------------------------------- */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.invisible {
    visibility: hidden;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

/* ----------------------------------------
   TEXT ALIGNMENT
   ---------------------------------------- */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ----------------------------------------
   FLEX UTILITIES
   ---------------------------------------- */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-start {
    display: flex;
    align-items: flex-start;
}

.flex-end {
    display: flex;
    align-items: flex-end;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* ----------------------------------------
   SPACING - MARGINS
   ---------------------------------------- */
.m-0 {
    margin: 0;
}

.m-auto {
    margin: auto;
}

.mt-0 {
    margin-top: 0;
}

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mt-2xl {
    margin-top: var(--space-2xl);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mb-2xl {
    margin-bottom: var(--space-2xl);
}

.ml-0 {
    margin-left: 0;
}

.ml-auto {
    margin-left: auto;
}

.mr-0 {
    margin-right: 0;
}

.mr-auto {
    margin-right: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------
   SPACING - PADDING
   ---------------------------------------- */
.p-0 {
    padding: 0;
}

.pt-0 {
    padding-top: 0;
}

.pt-xs {
    padding-top: var(--space-xs);
}

.pt-sm {
    padding-top: var(--space-sm);
}

.pt-md {
    padding-top: var(--space-md);
}

.pt-lg {
    padding-top: var(--space-lg);
}

.pt-xl {
    padding-top: var(--space-xl);
}

.pb-0 {
    padding-bottom: 0;
}

.pb-xs {
    padding-bottom: var(--space-xs);
}

.pb-sm {
    padding-bottom: var(--space-sm);
}

.pb-md {
    padding-bottom: var(--space-md);
}

.pb-lg {
    padding-bottom: var(--space-lg);
}

.pb-xl {
    padding-bottom: var(--space-xl);
}

.px-md {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.py-md {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

/* ----------------------------------------
   WIDTH UTILITIES
   ---------------------------------------- */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.max-w-container {
    max-width: var(--container-max);
}

.max-w-narrow {
    max-width: var(--container-narrow);
}

/* ----------------------------------------
   HEIGHT UTILITIES
   ---------------------------------------- */
.h-full {
    height: 100%;
}

.h-auto {
    height: auto;
}

.min-h-screen {
    min-height: 100vh;
}

/* ----------------------------------------
   POSITIONING
   ---------------------------------------- */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

/* ----------------------------------------
   OVERFLOW
   ---------------------------------------- */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-visible {
    overflow: visible;
}

/* ----------------------------------------
   TEXT UTILITIES
   ---------------------------------------- */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-white {
    color: var(--text-white);
}

.text-blue {
    color: var(--primary-blue);
}

.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.uppercase {
    text-transform: uppercase;
}

.lowercase {
    text-transform: lowercase;
}

.capitalize {
    text-transform: capitalize;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----------------------------------------
   BACKGROUND UTILITIES
   ---------------------------------------- */
.bg-white {
    background-color: var(--bg-white);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
}

.bg-blue {
    background-color: var(--primary-blue);
}

.bg-gradient {
    background: var(--bg-gradient);
}

/* ----------------------------------------
   BORDER UTILITIES
   ---------------------------------------- */
.border {
    border: 1px solid var(--border-color);
}

.border-top {
    border-top: 1px solid var(--border-color);
}

.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.border-none {
    border: none;
}

.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-circle);
}

.rounded-pill {
    border-radius: var(--radius-pill);
}

/* ----------------------------------------
   SHADOW UTILITIES
   ---------------------------------------- */
.shadow-none {
    box-shadow: none;
}

.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);
}

/* ----------------------------------------
   CURSOR UTILITIES
   ---------------------------------------- */
.cursor-pointer {
    cursor: pointer;
}

.cursor-default {
    cursor: default;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* ----------------------------------------
   OPACITY UTILITIES
   ---------------------------------------- */
.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-100 {
    opacity: 1;
}

/* ----------------------------------------
   TRANSITION UTILITIES
   ---------------------------------------- */
.transition {
    transition: var(--transition-normal);
}

.transition-fast {
    transition: var(--transition-fast);
}

.transition-smooth {
    transition: var(--transition-smooth);
}

.transition-none {
    transition: none;
}

/* ----------------------------------------
   ACCESSIBILITY
   ---------------------------------------- */
.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;
}

.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ----------------------------------------
   RESPONSIVE VISIBILITY
   ---------------------------------------- */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-tablet {
        display: none !important;
    }

    .show-mobile {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .hide-desktop {
        display: none !important;
    }

    .show-tablet {
        display: none !important;
    }
}
