/* ==========================================================================
   WayUgo — Utilities

   LOADED LAST, ON PURPOSE.

   These classes replaced ~600 inline styles. An inline style beats every rule
   in every stylesheet; a class does not. Moving `margin-top: 1rem` from a style
   attribute onto `.wu-mt-4` silently changed nothing on most elements and
   silently changed everything on a few - `.wu-card-features { margin: 0 }` in
   cards.css has the same specificity and loads later, so it won.

   A utility is an explicit instruction on one element, so it has to outrank the
   component's default. Load order is what gives it that, which is why this file
   comes after every component. Do not fold it back into style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout utilities

   These exist because the same declarations were written inline 600 times
   across 93 files. An inline style cannot be themed, cannot be overridden by a
   media query, and cannot be found by searching the stylesheet - so anything
   that is DESIGN belongs here. Anything that is DATA (a bar's width, a slide's
   photograph, a swatch's colour) stays inline, because a class per value is
   not a design system.
   -------------------------------------------------------------------------- */
.wu-justify-between { justify-content: space-between; }
.wu-justify-center  { justify-content: center; }
.wu-justify-end     { justify-content: flex-end; }
.wu-items-center    { align-items: center; }
.wu-items-start     { align-items: flex-start; }

.wu-block  { display: block; }
.wu-grid-1 { grid-template-columns: 1fr; }
.wu-m-0    { margin: 0; }
.wu-p-0    { padding: 0; }
.wu-pt-0   { padding-top: 0; }

/* Logical, not `margin-left: auto`: this is "push to the far end", which in an
   RTL document means the other side. The inline version never mirrored. */
.wu-ms-auto { margin-inline-start: auto; }

.wu-mt-2 { margin-top: var(--wu-space-2); }
.wu-mt-3 { margin-top: var(--wu-space-3); }
.wu-mt-4 { margin-top: var(--wu-space-4); }
.wu-mt-5 { margin-top: var(--wu-space-5); }
.wu-mt-6 { margin-top: var(--wu-space-6); }
.wu-mt-7 { margin-top: var(--wu-space-7); }

/* Three values sit off the 4px spacing scale. They are in a stylesheet now
   rather than in 93 style attributes, but kept at their exact values so this
   refactor moves nothing on screen. Snap them to the scale the next time that
   design is touched. */
.wu-mt-note { margin-top: 1.25rem; }
.wu-mt-hair { margin-top: .4rem; }
.wu-mb-note { margin-bottom: 1.25rem; }
.wu-mb-wide { margin-bottom: 2.5rem; }
.wu-mt-wide { margin-top: 2.5rem; }

/* A block with breathing room above and below but flush to its column. */
.wu-my-5 { margin-block: var(--wu-space-5); margin-inline: 0; }

/* A select sized to its content rather than its column - the language and
   currency switchers, the passenger count above a seat map. */
.wu-select-auto { width: auto; padding-block: .4rem; }

.wu-text-start   { text-align: start; }
.wu-text-heading { color: var(--wu-heading); }

.wu-list-plain { list-style: none; margin: 0; padding: 0; }

/* A table or a code block that must scroll inside its own box rather than
   taking the page with it. */
.wu-scroll-x { overflow-x: auto; }

/* Spans every column of the grid it sits in - empty states, full-width rows. */
.wu-col-full { grid-column: 1 / -1; }

.wu-border-t-0 { border-top: 0; }

/* An icon set in a line of text. Without these two the glyph sits on the
   baseline and pushes the line box taller than the text around it. */
.wu-icon-inline { display: inline; vertical-align: -2px; }
