/*
 * Il calendario delle prenotazioni (js/prenota.js), dal 13/11/2026 al posto di Calendly.
 * File a mano, non generato da Tailwind: lo carica solo includes/prenota-widget.php,
 * cioe' la pagina /prenota/ e la linguetta "Scegli una data" della home.
 * Colori: il blu di marca (#0057b7 e la sua scala), i grigi slate del modulo di contatto.
 */

.prenota {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 41, 59, 0.08);
  padding: 24px;
  color: #1e293b;
  min-height: 360px;
}

.prenota *:focus-visible {
  outline: 2px solid #0057b7;
  outline-offset: 2px;
}

.prenota-testa {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 20px;
}

.prenota-titolo {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.prenota-nota {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

/* Attesa, errore, conferma: un blocco centrato */
.prenota-stato {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  min-height: 300px;
  padding: 16px 8px;
}

.prenota-stato p {
  margin: 0;
  max-width: 28rem;
  color: #475569;
  line-height: 1.6;
}

.prenota-stato strong {
  color: #0f172a;
}

.prenota-stato-titolo {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.prenota-icona {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ebf3fa;
  color: #0057b7;
}

.prenota-icona svg {
  width: 26px;
  height: 26px;
}

.prenota-giro {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 3px solid #ccdef1;
  border-top-color: #0057b7;
  animation: prenota-gira 0.9s linear infinite;
}

@keyframes prenota-gira {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .prenota-giro { animation-duration: 2.4s; }
}

/* Il mese e gli orari: affiancati da 768px, uno sotto l'altro prima */
.prenota-scelta {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .prenota-scelta {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }
}

.prenota-mese-testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.prenota-mese-nome {
  font-weight: 600;
  color: #0f172a;
  text-transform: capitalize;
}

.prenota-freccia {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0057b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.prenota-freccia:hover:not(:disabled) {
  background: #ebf3fa;
  border-color: #99bce2;
}

.prenota-freccia:disabled {
  color: #cbd5e1;
  cursor: default;
}

.prenota-freccia svg {
  width: 18px;
  height: 18px;
}

.prenota-griglia {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.prenota-griglia-testa {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  text-align: center;
  padding: 4px 0 8px;
}

.prenota-giorno {
  aspect-ratio: 1 / 1;
  min-height: 40px;
  border-radius: 9999px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

button.prenota-giorno {
  background: #ebf3fa;
  color: #004ca0;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

button.prenota-giorno:hover {
  background: #ccdef1;
}

button.prenota-giorno[aria-pressed="true"] {
  background: #0057b7;
  color: #fff;
}

.prenota-orari-titolo {
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 12px;
}

/* Solo la prima lettera: "Lunedì 16 novembre", non "Lunedì 16 Novembre" */
.prenota-orari-titolo::first-letter {
  text-transform: uppercase;
}

.prenota-orari {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}

@media (min-width: 768px) {
  .prenota-orari {
    grid-template-columns: 1fr;
  }
}

.prenota-orario {
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid #99bce2;
  background: #fff;
  color: #004ca0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.prenota-orario:hover {
  background: #0057b7;
  border-color: #0057b7;
  color: #fff;
}

.prenota-vuoto {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* Il riepilogo dell'orario scelto, sopra il modulo */
.prenota-riepilogo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  background: #ebf3fa;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.prenota-riepilogo-quando {
  font-weight: 700;
  color: #00346e;
}

.prenota-riepilogo-quando::first-letter {
  text-transform: uppercase;
}

.prenota-riepilogo-dettaglio {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: #475569;
  margin-top: 2px;
}

.prenota-link {
  background: none;
  border: 0;
  padding: 8px 4px;
  font: inherit;
  font-weight: 600;
  color: #0057b7;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.prenota-link:hover {
  color: #00346e;
}

/* Il modulo: gli stessi campi del modulo di contatto, piu' asciutti */
.prenota-campi {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .prenota-campi {
    grid-template-columns: 1fr 1fr;
  }
  .prenota-campo-largo {
    grid-column: 1 / -1;
  }
}

.prenota-campo label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.prenota-campo label span {
  font-weight: 400;
  color: #64748b;
}

.prenota-campo input,
.prenota-campo textarea {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.prenota-campo input:focus,
.prenota-campo textarea:focus {
  outline: none;
  border-color: #0057b7;
  box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.15);
}

.prenota-campo textarea {
  resize: vertical;
  min-height: 88px;
}

.prenota-consenso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
}

.prenota-consenso input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex: none;
  accent-color: #0057b7;
}

.prenota-consenso a {
  color: #0057b7;
  text-decoration: underline;
}

.prenota-azioni {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 20px;
}

.prenota-avviso {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prenota-bottone-secondario {
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.prenota-bottone-secondario:hover {
  border-color: #64748b;
  color: #0f172a;
}

.prenota-bottone-pericolo {
  border-color: #fecaca;
  color: #b91c1c;
}

.prenota-bottone-pericolo:hover {
  border-color: #b91c1c;
  color: #991b1b;
}

.prenota [disabled] {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 479px) {
  .prenota {
    padding: 16px;
    border-radius: 12px;
  }
  .prenota-azioni > * {
    width: 100%;
  }
}
