/*
 * The match layout picker in the phone's main menu (screens/menu-layout-pick.js,
 * docs/plans/19-phone-layouts.md). Four buttons in fixed places, and room kept
 * for two lines of description, so nothing in the menu moves when the choice
 * changes. A desktop has one layout and never sees it.
 */
.layout-pick {
  display: none;
}

:root[data-phone='true'] .layout-pick {
  display: grid;
  gap: var(--space-1);
}

.layout-pick__choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-1);
}

.layout-pick__choice {
  min-height: var(--target);
  padding: 0 var(--space-1);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.layout-pick__line {
  min-height: 2.6em;
  font-size: var(--text-xs);
  line-height: 1.3;
  color: var(--text-dim);
}

/* Sideways the menu is short: one row, the label beside the buttons, and no description. */
:root[data-phone='true'][data-orient='landscape'] .layout-pick {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-2);
}

:root[data-phone='true'][data-orient='landscape'] .layout-pick__choice {
  padding: 0;
  font-size: 0.6875rem;
}

:root[data-phone='true'][data-orient='landscape'] .layout-pick__ask,
:root[data-phone='true'][data-orient='landscape'] .layout-pick__line {
  display: none;
}

/* A phone too short for one more row keeps the menu whole; Settings has the same choice. */
@media (max-height: 22rem) {
  :root[data-phone='true'][data-orient='landscape'] .layout-pick {
    display: none;
  }
}
