/* ========== site.css ========== */

/* 1) Assicuro altezza piena per html e body, senza scroll verticale inutile */
html, body {
  height: 100%;
  margin: 0;
}

/* ── riposiziona e ingrandisci le bandiere ───────────────────────────── */
.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  width: 100%;
}
.lang-switcher button {
  background: none;
  border: none;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity .2s;
}
.lang-switcher button.selected,
.lang-switcher button:hover {
  opacity: 1;
}

/* make body a column flex so footer sticks bottom */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: sans-serif;
  background: #d4e4f0;
  color: #333;
}

/* ─── WRAPPER DEL CONTENUTO ───────────────────────────────────────────── */
#content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;    /* centri orizzontalmente, nessun margine verticale */
  padding: 0;        /* rimuovo padding extra */
}



/* header & footer share background & full width */
header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #d4e4f0;
}
footer {
  font-size: 0.85rem;
  justify-content: center;
  margin-top: auto;
}



/* ── HEADER STATUS COLUMN ───────────────────────────────── */
.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ── Bouncing Dots Spinner ───────────────────────────────────── */
.dots {
  display: flex;
  gap: 0.25rem;
}
.dots div {
  width: 0.25rem;
  height: 0.25rem;
  background: #001f3f;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}
.dots div:nth-child(2) { animation-delay: 0.2s; }
.dots div:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  to { transform: translateY(-0.25rem); opacity: 0.7; }
}

/* nasconde loader header di default; ui.js regola l'attributo hidden */
#loader[hidden] { display: none; }

/* dopo loading, mostra .status-info */
.status-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-block;
}
.status-text {
  font-weight: bold;
}

/* ── MAIN CONTENT AREA ─────────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;   /* meno spazio verticale per evitare scroll */
}
#content[hidden] { display: none; }

/* central message when not booked */
#notBookedMessage {
  text-align: center;
  margin: 2rem 0;
  font-size: 1rem;
}

/* ── FORM & BUTTONS ────────────────────────────────────────────── */
#pin {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 1rem;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}
#btnReg,
#btnOpen {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  background: #001f3f;
  color: #fff;
  border-radius: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: opacity .2s ease;
}
#btnReg:hover,
#btnOpen:hover {
  opacity: 0.9;
}

/* ── ALERT MESSAGES ─────────────────────────────────────────────── */
/* regole generali per .alert (colori) */
.alert-danger  { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info    { background: #d1ecf1; color: #0c5460; }
.alert-success { background: #d4edda; color: #155724; }

/* override solo per il messaggio in #msg: nessun pill-shape, nessun background */
#msg.alert {
  background: transparent !important;   /* niente sfondo */
  border: none !important;              /* niente bordo */
  border-radius: 0 !important;          /* niente arrotondamenti */
  padding: 0.5rem 0 !important; /* un po’ di spazio verticale */
  color: inherit !important;
}

/* ── INFO TEXT ─────────────────────────────────────────────────── */
#infoText {
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.5rem;
  text-align: center;
  max-width: 300px;
  width: 100%;
}
/* avviso incognito, visibile solo in showInteraction/showRegisteredUI */
#incognitoWarning {
  margin-top: 0;
  text-align: center;
}

/* 2) Titolo responsive su smartphone */
@media (max-width: 576px) {
  header h1 {
    font-size: 1.5rem;
  }
}
