/*
 * THE PICKING FACE OF A TIME — one column per unit, each a listbox that scrolls.
 *
 * The rows are denser than a menu's, because a column has to show enough values
 * either side of the seated one to read as a scale. The height is declared ONCE
 * here and every row takes it through `--lotics-menu-button-height`, so the window
 * and the rows cannot disagree about what a row is.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-time-columns {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--lotics-space-4);
    /* Row height, and the unit the window counts in. */
    --lotics-time-columns-row: 36px;
    --lotics-menu-button-height: var(--lotics-time-columns-row);
  }

  /* ODD many rows, so the seated one sits near the middle with context above and
     below it rather than at an edge. */
  .lotics-time-columns__column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 56px;
    max-height: calc(var(--lotics-time-columns-row) * 7);
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--lotics-radius-control);
    background-color: var(--card);
    scrollbar-width: none;
  }

  .lotics-time-columns__column::-webkit-scrollbar {
    display: none;
  }

  /* Padding rather than a spacer row, so the first and last values can still
     reach the middle of the window when the column is scrolled to an end. */
  .lotics-time-columns__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-block: var(--lotics-space-2);
  }
}
