/* Tour dates with a countdown: a list of shows on warm white, one accent. */
:root {
  --fondo: #f4f1ea;      /* warm white paper */
  --inchiostro: #1b1a17; /* the cities and the dates */
  --riga: #ddd8ce;       /* the hairlines between the shows */
  --spento: #a39d92;     /* the small labels, sold out */
  --accento: #d8461f;    /* the one accent: the days to go */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.scena {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* the size: the script sets --f so the list fits the width and the height of the box */
.tour {
  --f: 28px;
  width: min(100%, calc(var(--f) * 15));
  font-size: var(--f);
}

.testa {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: calc(var(--f) * 0.5);
  font-size: max(11px, calc(var(--f) * 0.4));
  letter-spacing: 0.02em;
  font-variation-settings: 'wght' 480, 'wdth' 100;
  color: var(--spento);
}

.artista { color: var(--inchiostro); font-variation-settings: 'wght' 560, 'wdth' 100; }

.date { list-style: none; }

/* one show: the hairline is drawn by the script so it can grow in */
.show {
  position: relative;
  display: grid;
  grid-template-columns: 4.6em 1fr auto;
  align-items: center;
  height: 1.95em;
  cursor: pointer;
}

.filo {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--riga);
  transform-origin: 0 50%;
}
.show:last-child .filo-sotto { top: auto; bottom: 0; }

/* the slot where the date and the days to go take turns: two lines, one clipped window */
.quando {
  position: relative;
  height: 1.2em;
  overflow: hidden;
  font-variation-settings: 'wght' 420, 'wdth' 96;
}

.linea {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  line-height: 1.2em;
}

.linea-giorni .car:first-child { font-variant-numeric: tabular-nums; }

.linea-giorni { color: var(--accento); font-variation-settings: 'wght' 560, 'wdth' 100; }

.car {
  display: inline-block;
  white-space: pre;
  will-change: transform;
}

.citta {
  white-space: nowrap;
  overflow: visible;
  line-height: 1.2em;
}

.citta-dentro { display: inline-block; will-change: transform; }

.stato {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: max(11px, calc(var(--f) * 0.42));
  letter-spacing: 0.02em;
  font-variation-settings: 'wght' 500, 'wdth' 100;
  white-space: nowrap;
}

.stato-fuori { color: var(--spento); }

.stato-testo { display: inline-block; will-change: transform; }

/* the arrow waits on the right edge; the status steps left to make room for it */
.freccia {
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -0.525em;
  width: 1.05em;
  height: 1.05em;
  overflow: visible;
  color: var(--accento);
}

.nota {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(12px, 5vh, 40px);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  font-variation-settings: 'wght' 420;
  color: var(--spento);
  opacity: 0;
}
