/* ===== FLEX CONTAINERS ===== */
.flex,
.flex-row,
.row,
.flex-col,
.col,
.column,
.flex-row-reverse,
.row-r,
.flex-col-reverse,
.col-r,
.column-r,
.flex-wrap,
.flex-nowrap,
.inline-flex {
    display: flex;
}

/* ===== FLEX DIRECTION ===== */
.row,
.row-r .flex-row {
    flex-direction: row;
}

.col,
.col-r,
.column,
.column-r,
.flex-col,
.flex-column {
    flex-direction: column;
}

.row-r,
.flex-row-r,
.flex-row-reverse {
    flex-direction: row-reverse;
}

.col-r,
.column-r,
.flex-col-r,
.flex-col-reverse,
.flex-column-reverse {
    flex-direction: column-reverse;
}

/* ===== FLEX WRAP ===== */
.flex-wrap {
    flex-wrap: wrap;
}

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

/* Center both axes (flex items) */
.center {
    align-items: center;
    justify-content: center;
}

/* Center main axis */
.center-x {
    justify-content: center;
}

/* Center cross axis */
.center-y {
    align-items: center;
}

/* justify-content
   Declared AFTER .center on purpose: "row justify-between center" is a
   common idiom sitewide (title left / actions right, vertically centered)
   - .center alone sets justify-content:center too (for the "center both
   axes" case with no other justify-* class), and without this ordering
   its rule would silently win over .justify-between/-around/-evenly on any
   element combining both, since same-specificity CSS resolves by source
   order, not by which class looks more "specific" in intent. This was a
   real, previously-unnoticed bug - subtle in wide headers (title/actions
   widths already fill most of the row so centered vs. spread-apart look
   nearly identical), glaring in narrower content (e.g. the template
   editor's variable cards, where a token and its source badge ended up
   touching instead of spread to either end). */
.justify-start {
    justify-content: flex-start;
}

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

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

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

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

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

/* flex: N shorthand (grow+shrink+basis:0%) - distinct from flex-grow above
   (grow only, basis:auto). Added because 21+ templates were writing
   style="flex: 1;"/"flex: 2;" inline with no matching utility to reach for. */
.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

/* ------------
    TEXT
------------- */

.uppercase {
    text-transform: uppercase;
}

.text-xs {
    font-size: var(--font-xs);
}

/* reset.css sets font-size: var(--root-font-size) on <code> as an absolute
   value rather than letting it inherit, so an inline <code> inside small text
   snaps back to the root 14px and towers over the sentence around it. Visible
   anywhere a hint mentions a command or a filename. Scoped to .text-xs rather
   than fixed in the reset: unpicking that declaration would resize every
   <code> in the app, and this is the context where it actually goes wrong. */
.text-xs code {
    font-size: inherit;
}

/* Padding (all sides) */
.p-1 {
    padding: var(--p1);
}

.p-2 {
    padding: var(--p2);
}

.p-3 {
    padding: var(--p3);
}

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

.p-5 {
    padding: var(--p5);
}

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

/* Padding Bottom */
.pb-0 {
    padding-bottom: 0;
}

.pb-1 {
    padding-bottom: var(--p1);
}

.pb-2 {
    padding-bottom: var(--p2);
}

.pb-3 {
    padding-bottom: var(--p3);
}

.pb-4 {
    padding-bottom: var(--p4);
}

.pb-5 {
    padding-bottom: var(--p5);
}

.pb-6 {
    padding-bottom: var(--p6);
}

/* Gap */
.g-1 {
    gap: var(--g1);
}

.g-2 {
    gap: var(--g2);
}

.g-3 {
    gap: var(--g3);
}

.g-4 {
    gap: var(--g4);
}

.g-5 {
    gap: var(--g5);
}

.g-6 {
    gap: var(--g6);
}

.w-12,
.max-width,
.w-full,
.w-max {
    width: 100%;
}

.h-12,
.max-height,
.h-full,
.h-max {
    height: 100%;
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
