/* =====================================================
   UTILITIES.CSS — Generic behavior-based utility classes
   Naming convention: [effect]-[property][value][duration]
   Examples:
     hover-up5px1S  -> hover, translateY(-5px), 1s duration
     fade-in2S      -> fade in animation, 2s duration
     bg-blue        -> background: var(--primary)
     text-center    -> text-align: center
   ===================================================== */

/* ---------- Card base ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1.2rem;
}

/* ---------- Hover lift effects ---------- */
.hover-up5px1S {
    transition: transform 1s ease, box-shadow 1s ease;
}
.hover-up5px1S:hover {
    transform: translateY(-5px);
}

.hover-up3px05S {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.hover-up3px05S:hover {
    transform: translateY(-3px);
}

.hover-up8px1S {
    transition: transform 1s ease, box-shadow 1s ease;
}
.hover-up8px1S:hover {
    transform: translateY(-8px);
}

.hover-up5px05S {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.hover-up5px05S:hover {
    transform: translateY(-5px);
}

/* ---------- Fade animations ---------- */
.fade-in05S { animation: fadeIn 0.5s ease both; }
.fade-in1S  { animation: fadeIn 1s ease both; }
.fade-in2S  { animation: fadeIn 2s ease both; }
.fade-in3S  { animation: fadeIn 3s ease both; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.fade-in-up05S { animation: fadeInUp 0.5s ease both; }
.fade-in-up1S  { animation: fadeInUp 1s ease both; }
.fade-in-up2S  { animation: fadeInUp 2s ease both; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(1.2rem); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-down05S { animation: fadeInDown 0.5s ease both; }
.fade-in-down1S  { animation: fadeInDown 1s ease both; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-1.2rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Scale animations ---------- */
.scale-in05S { animation: scaleIn 0.5s ease both; }
.scale-in1S  { animation: scaleIn 1s ease both; }

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- Text alignment ---------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ---------- Font weight ---------- */
.bold      { font-weight: 700; }
.semibold  { font-weight: 600; }
.medium    { font-weight: 500; }
.normal    { font-weight: 400; }

/* ---------- Font style ---------- */
.italic { font-style: italic; }

/* ---------- Text transform ---------- */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* ---------- Font size ---------- */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-md { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

/* ---------- Display ---------- */
.flex           { display: flex; }
.grid           { display: grid; }
.block          { display: block; }
.inline-block   { display: inline-block; }
.inline-flex    { display: inline-flex; }
.hidden         { display: none; }

/* ---------- Flex direction ---------- */
.flex-col         { flex-direction: column; }
.flex-row         { flex-direction: row; }
.flex-wrap        { flex-wrap: wrap; }
.flex-nowrap      { flex-wrap: nowrap; }
.flex-1           { flex: 1; }
.flex-grow        { flex-grow: 1; }
.flex-shrink-0    { flex-shrink: 0; }

/* ---------- Align items ---------- */
.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-stretch  { align-items: stretch; }

/* ---------- Justify content ---------- */
.justify-start    { justify-content: flex-start; }
.justify-center   { justify-content: center; }
.justify-end      { justify-content: flex-end; }
.justify-between  { justify-content: space-between; }
.justify-around   { justify-content: space-around; }
.justify-evenly   { justify-content: space-evenly; }

/* ---------- Gap ---------- */
.gap-0  { gap: 0; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.gap-4  { gap: 2rem; }

/* ---------- Padding ---------- */
.p-0  { padding: 0; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.p-4  { padding: 2rem; }
.p-5  { padding: 3rem; }

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

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

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 0.5rem; }
.pl-2 { padding-left: 1rem; }
.pl-3 { padding-left: 1.5rem; }
.pl-4 { padding-left: 2rem; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 0.5rem; }
.pr-2 { padding-right: 1rem; }
.pr-3 { padding-right: 1.5rem; }
.pr-4 { padding-right: 2rem; }

/* ---------- Margin ---------- */
.m-0  { margin: 0; }
.m-1  { margin: 0.5rem; }
.m-2  { margin: 1rem; }
.m-3  { margin: 1.5rem; }
.m-4  { margin: 2rem; }
.m-5  { margin: 3rem; }
.m-auto { margin: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mt-auto { margin-top: auto; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mb-auto { margin-bottom: auto; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 1rem; }
.ml-3 { margin-left: 1.5rem; }
.ml-4 { margin-left: 2rem; }
.ml-auto { margin-left: auto; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 1rem; }
.mr-3 { margin-right: 1.5rem; }
.mr-4 { margin-right: 2rem; }
.mr-auto { margin-right: auto; }

/* ---------- Width ---------- */
.w-auto  { width: auto; }
.w-full  { width: 100%; }
.w-screen { width: 100vw; }
.w-min   { width: min-content; }
.w-max   { width: max-content; }

.vw10  { width: 10vw; }
.vw20  { width: 20vw; }
.vw50  { width: 50vw; }
.vw100 { width: 100vw; }

.pw10  { width: 10%; }
.pw20  { width: 20%; }
.pw50  { width: 50%; }
.pw80  { width: 80%; }
.pw100 { width: 100%; }

/* ---------- Max width ---------- */
.mw-0 { max-width: 0; }
.mw-1 { max-width: 0.5rem; }
.mw-2 { max-width: 1rem; }
.mw-3 { max-width: 1.5rem; }
.mw-4 { max-width: 2rem; }
.mw-5 { max-width: 3rem; }
.mw-full { max-width: 100%; }
.mw-screen { max-width: 100vw; }
.mw-none { max-width: none; }

/* ---------- Min width ---------- */
.minw-0 { min-width: 0; }
.minw-full { min-width: 100%; }

/* ---------- Height ---------- */
.h-auto   { height: auto; }
.h-full   { height: 100%; }
.h-screen { height: 100vh; }
.h-min    { height: min-content; }
.h-max    { height: max-content; }

.vh10  { height: 10vh; }
.vh20  { height: 20vh; }
.vh50  { height: 50vh; }
.vh100 { height: 100vh; }

/* ---------- Max height ---------- */
.mh-0 { max-height: 0; }
.mh-1 { max-height: 0.5rem; }
.mh-2 { max-height: 1rem; }
.mh-3 { max-height: 1.5rem; }
.mh-4 { max-height: 2rem; }
.mh-5 { max-height: 3rem; }
.mh-full { max-height: 100%; }
.mh-screen { max-height: 100vh; }
.mh-none { max-height: none; }

/* ---------- Min height ---------- */
.minh-0 { min-height: 0; }
.minh-full { min-height: 100%; }
.minh-screen { min-height: 100vh; }

/* ---------- Border radius ---------- */
.round-none { border-radius: 0; }
.round-1 { border-radius: 0.25rem; }
.round-2 { border-radius: 0.5rem; }
.round-3 { border-radius: 0.75rem; }
.round-4 { border-radius: 1rem; }
.round-5 { border-radius: 1.5rem; }
.round-full { border-radius: 999px; }

/* ---------- Background ---------- */
.bg-transparent { background: transparent; }
.bg-white       { background: #ffffff; }
.bg-black       { background: #000000; }
.bg-blue        { background: var(--primary); }
.bg-blue-dark   { background: var(--primary-deep); }
.bg-blue-light  { background: var(--panel-2); }
.bg-muted       { background: var(--muted); }
.bg-panel       { background: var(--panel); }
.bg-gradient    { background: linear-gradient(var(--grad-angle, 90deg), var(--grad-start), var(--grad-end)); }

.grad-sl { --grad-start: var(--secondary-color); --grad-end: var(--light-color); }
.grad-wl { --grad-start: var(--white-color); --grad-end: var(--light-color); }
.grad-ang-135 { --grad-angle: 135deg; }
.grad-ang-180 { --grad-angle: 180deg; }
.grad-ang-90  { --grad-angle: 90deg; }
.grad-ang-0   { --grad-angle: 0deg; }

/* ---------- Text color ---------- */
.text-primary    { color: var(--primary); }
.text-primary-deep { color: var(--primary-deep); }
.text-muted      { color: var(--muted); }
.text-white      { color: #ffffff; }
.text-black      { color: #000000; }
.text-blue       { color: var(--primary); }
.text-blue-light { color: #90c6ff; }

/* ---------- Border ---------- */
.border     { border: 1px solid var(--border); }
.border-0   { border: 0; }
.border-t   { border-top: 1px solid var(--border); }
.border-b   { border-bottom: 1px solid var(--border); }
.border-l   { border-left: 1px solid var(--border); }
.border-r   { border-right: 1px solid var(--border); }

/* ---------- Box shadow ---------- */
.shadow-1 { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.shadow-2 { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.shadow-3 { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.shadow-4 { box-shadow: 0 16px 34px rgba(18, 53, 100, 0.15); }
.shadow-5 { box-shadow: 0 18px 50px rgba(18, 53, 100, 0.12); }

/* ---------- Cursor ---------- */
.cursor-pointer  { cursor: pointer; }
.cursor-default  { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* ---------- Overflow ---------- */
.ov-hidden  { overflow: hidden; }
.ov-auto    { overflow: auto; }
.ov-scroll  { overflow: scroll; }
.ov-visible { overflow: visible; }

/* ---------- Position ---------- */
.absolute { position: absolute; }
.relative { position: relative; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.static   { position: static; }

/* ---------- Top / Right / Bottom / Left ---------- */
.top-0    { top: 0; }
.top-auto { top: auto; }
.right-0  { right: 0; }
.right-auto { right: auto; }
.bottom-0 { bottom: 0; }
.bottom-auto { bottom: auto; }
.left-0   { left: 0; }
.left-auto { left: auto; }

/* ---------- Z-index ---------- */
.z-0  { z-index: 0; }
.z-1  { z-index: 1; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-99 { z-index: 99; }
.z-100 { z-index: 100; }

/* ---------- Opacity ---------- */
.opacity-0   { opacity: 0; }
.opacity-25  { opacity: 0.25; }
.opacity-50  { opacity: 0.5; }
.opacity-75  { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ---------- Pointer events ---------- */
.pointer-events-none  { pointer-events: none; }
.pointer-events-auto  { pointer-events: auto; }

/* ---------- User select ---------- */
.select-none    { user-select: none; }
.select-text    { user-select: text; }
.select-all     { user-select: all; }

/* ---------- Misc ---------- */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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