/*
 * The You panel's blueprints (lobby-you.js): name, color, then your units'
 * blueprints filling the rest of the panel in the color you picked, and a
 * slim row of unit names along the very bottom to pick which one shows.
 * Loaded after the phone and desktop lobby files, so it wins over both.
 */
.lobby .panel.lobby__you[data-lobby-panel] {
  display: flex;
  flex-direction: column;
}

/* On a phone the You panel still hides while another tab is open (phone-lobby.css). */
:root:is([data-phone='true'], [data-tight='true']) .lobby .panel.lobby__you[data-active='false'] {
  display: none;
}

.lobby .menu-prints {
  flex: 1 1 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  gap: var(--space-2);
}

.lobby .menu-prints__name {
  text-align: center;
}

/* A thin rule with the names on it; the one showing is lit, the one you picked carries the bar. */
.menu-prints__picker {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.menu-prints__pick {
  min-height: 2.25rem;
  margin-top: -1px;
  padding: 0 var(--space-1);
  background: none;
  border: 0;
  border-top: 2px solid transparent;
  color: var(--text-dim);
  font: 600 0.625rem / 1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition:
    color var(--dur-quick) var(--ease-standard),
    border-color var(--dur-quick) var(--ease-standard);
}

.menu-prints__pick:hover,
.menu-prints__pick[data-current='true'] {
  color: var(--text);
}

.menu-prints__pick[aria-pressed='true'] {
  color: var(--accent);
  border-top-color: var(--accent);
}

.menu-prints__pick:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: -2px;
}

/* Too short to draw in: the block keeps its place but shows nothing (menu-blueprints.js). */
.menu-prints.is-cramped > * {
  visibility: hidden;
}

/* A phone: nine colors to a row, as sideways and on a desktop, so the
   blueprints have room under them; the You tab already names the panel. */
:root:is([data-phone='true'], [data-tight='true']) .lobby .swatches__row {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

:root:is([data-phone='true'], [data-tight='true']) .lobby__you > .eyebrow {
  display: none;
}

/* Sideways: your name and the blueprints on the left, the colors on the right, so all of it fits. */
:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape']
  .lobby
  .panel.lobby__you[data-lobby-panel] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
}

:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape'] .lobby__name-field {
  grid-column: 1;
  grid-row: 1;
}

:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape'] .lobby__color-field {
  grid-column: 2;
  grid-row: 1 / span 2;
}

:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape'] .lobby .menu-prints {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

/* Sideways the names come three to a row in the narrow column, and the unit's name above goes. */
:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape'] .menu-prints__picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape'] .menu-prints__pick {
  min-height: 1.75rem;
}

:root:is([data-phone='true'], [data-tight='true'])[data-orient='landscape']
  .lobby
  .menu-prints__name {
  display: none;
}
