/*
 * Gruppo: un rettangolo in coordinate mondo, in un layer sotto alle schermate
 * (z-index 0 contro l'1 dei frame), col nome sopra il bordo. Barra contro-scalata
 * con --vp-zoom-inv (= 1 / zoom) per restare leggibile a ogni livello di zoom.
 */

.sections {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0;
  height: 0;
}

.section {
  --hair: calc(1px * var(--vp-zoom-inv, 1));

  position: absolute;
  top: 0;
  left: 0;
  width: var(--w, 1200px);
  height: var(--sh, 900px);
  translate: var(--x, 0px) var(--y, 0px);
}

.section__bar {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  align-items: center;
  width: calc(100% * var(--vp-zoom, 1));
  height: var(--section-bar-height);
  padding: 0 4px;
  font-size: var(--text-md);
  line-height: 1;
  white-space: nowrap;
  transform-origin: 0 100%;
  scale: var(--vp-zoom-inv, 1);
}

.section__title {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-primary);
  font-weight: 600;
  text-overflow: ellipsis;
}

/*
 * Il corpo e' decorativo: `pointer-events: none` lascia passare il pan, che sopra
 * l'area di un gruppo deve funzionare come sullo sfondo.
 */
.section__body {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-lg) * var(--vp-zoom-inv, 1));
  background: var(--section-fill);
  box-shadow: 0 0 0 var(--hair) var(--section-border);
  pointer-events: none;
}
