/*
 * Barra dei prototipi «A | B» (Alkemy): in basso al centro, pillola scura, interruttore a lettere.
 * Riusabile in ogni progetto: non dipende dai colori del sito. Per cambiare l'aspetto si ridefiniscono le variabili --pb-*
 * sulla classe .protobarra. Imposta --protobarra-alt (spazio occupato in basso) per chi deve fargli posto nel layout.
 */
.protobarra {
  --pb-sfondo: rgb(15 17 19 / 0.92);
  --pb-testo: #c9ced4;
  --pb-attivo-sfondo: #fff;
  --pb-attivo-testo: #0f1113;
  --pb-accento: #1d5bd8; /* pallino con la lettera della proposta attiva */
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem 0.35rem 0.9rem; max-width: calc(100% - 1.5rem);
  border-radius: 999px; background: var(--pb-sfondo); color: #fff; backdrop-filter: blur(10px); box-shadow: 0 18px 48px rgb(15 17 19 / 0.3);
  font: 600 0.78rem/1.2 system-ui, sans-serif; overflow-x: auto; scrollbar-width: none;
}
:root:has(.protobarra) { --protobarra-alt: 3.9rem; }
.protobarra .pb-tag { font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8b9198; white-space: nowrap; }
.protobarra .pb-versione { display: flex; padding: 0.2rem; border-radius: 999px; background: rgb(255 255 255 / 0.1); flex: none; }
.protobarra .pb-versione button {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.85rem 0.4rem 0.5rem; border: 0; border-radius: 999px;
  background: none; color: var(--pb-testo); font: inherit; white-space: nowrap; cursor: pointer;
}
.protobarra .pb-versione button:hover { color: #fff; background: rgb(255 255 255 / 0.1); }
.protobarra .pb-versione b {
  display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: rgb(255 255 255 / 0.14); font-size: 0.7rem;
}
.protobarra .pb-versione button[aria-pressed="true"] { background: var(--pb-attivo-sfondo); color: var(--pb-attivo-testo); }
.protobarra .pb-versione button[aria-pressed="true"] b { background: var(--pb-accento); color: #fff; }
.protobarra .pb-versione button:not([aria-pressed="true"]) .pb-nome { display: none; } /* il nome si legge solo sulla proposta attiva */
.protobarra .pb-versione button:focus-visible { outline: 2px solid var(--pb-accento); outline-offset: 2px; }

/* Telefono in orizzontale: più bassa e senza etichetta. */
@media (max-height: 30rem) and (orientation: landscape) {
  .protobarra { bottom: 0.4rem; padding-left: 0.4rem; }
  .protobarra .pb-tag { display: none; }
  :root:has(.protobarra) { --protobarra-alt: 3.2rem; }
}
