/* Layout primitives shared by every page. No colors and no fonts. */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --content-narrow: 480px;
  --content-standard: 720px;
  --content-wide: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  touch-action: pan-x pan-y;
}

html {
  overflow-wrap: break-word;
}

/* Real buttons: never expose that they are links, never pop up iOS link preview callouts */
a,
button,
[role="button"],
input[type="button"],
input[type="submit"],
summary,
.button,
.item-card,
.lane-card,
.lane-row,
.load-card,
.roster-row,
.corridor-chip,
.corridor-map-btn,
nav a {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

img,
svg,
video {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

img,
svg,
video,
canvas,
input,
select,
textarea {
  max-width: 100%;
}

.layout-page,
.layout-narrow,
.layout-standard,
.layout-wide {
  margin-inline: auto;
  min-width: 0;
  padding-inline: var(--space-4);
}

.layout-page,
.layout-wide {
  width: min(100%, var(--content-wide));
}

.layout-standard {
  width: min(100%, var(--content-standard));
}

.layout-narrow {
  width: min(100%, var(--content-narrow));
}

.layout-frame {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.layout-frame > * {
  min-width: 0;
}

.layout-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.layout-stack > * {
  min-width: 0;
}

.layout-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.layout-cluster > * {
  min-width: 0;
}

.layout-card,
.layout-panel {
  min-width: 0;
  padding: var(--space-5);
}
