/* =====================================================
   CALENDARIO PRENOTAZIONI – VERSIONE DEFINITIVA
   ===================================================== */

#calendario.modal-block{
  display:none;
}


#calendario{
  transform: scale(1.40);
  transform-origin: top center;
}

/* =====================================================
   WRAPPER
   ===================================================== */
.cal-wrap{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  box-sizing:border-box;
}

/* =====================================================
   TOOLBAR (STACK VERTICALE)
   ===================================================== */
.cal-toolbar{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:16px 10px;
  box-sizing:border-box;  
}

/* label select */
.cal-left label{
  font-size:14px;
  color:#ffffff;
  text-align:center;
}

/* select */
.cal-left{
  width:100%;
  display:flex;
  justify-content:center;
}

.cal-left select{
  width:90%;
  max-width:340px;
  padding:12px 14px;
  font-size:16px;
  border-radius:14px;
  border:0;
  background:#ffffff;
  text-align:center;
}

/* navigazione mese */
.cal-center{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  color:#ffffff;
}

.cal-nav{
  background:none;
  border:none;
  font-size:26px;
  cursor:pointer;
  color:#ffffff;
}

.cal-month{
  font-size:18px;
  font-weight:700;
  color:#ffffff;
}

.cal-year{
  font-size:13px;
  color:#ffffff;
  text-align:center;
}

/* legenda */
.cal-right{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  font-size:13px;
  color:#ffffff;
}

.cal-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  display:inline-block;
}

.cal-dot.free{ background:#22c55e; }
.cal-dot.busy{ background:#ef4444; }

/* =====================================================
   WEEKDAYS (TESTO BIANCO)
   ===================================================== */
.cal-weekdays{
  width:100%;
  max-width:1020px;   /* ✅ +140px REALI */
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
  padding:6px;
  box-sizing:border-box;
}

.cal-weekdays div{
  text-align:center;
  font-size:14px;
  font-weight:700;
  color:#ffffff;
}

/* =====================================================
   GRID GIORNI (PIÙ LARGA DI 140px)
   ===================================================== */
.cal-grid{
  width:100%;
  max-width:1020px;   /* ✅ +20px PER CELLA */
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
  padding:6px;
  box-sizing:border-box;
}

/* =====================================================
   CELLE – QUADRATE REALI
   ===================================================== */
.cal-day{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio:1 / 1;   /* ✅ QUADRATE */
  border-radius:14px;
  box-sizing:border-box;
}

/* numero giorno (NON cambiato) */
.cal-day .num{
  font-size:18px;
  font-weight:800;
  line-height:1;
}

/* oggi */
.cal-day.today{
  outline:2px solid #2563eb;
}

/* =====================================================
   STATI
   ===================================================== */

/* giorni fuori mese = CELLE VUOTE */
.cal-day.out{
  background:transparent;
}

.cal-day.out .num{
  display:none;
}

/* disponibile */
.cal-day.free{
  background:#22c55e;
}

.cal-day.free .num{
  color:#ffffff;
}

/* non disponibile */
.cal-day.busy{
  background:#ef4444;
}

.cal-day.busy .num{
  color:#ffffff;
}

/* =====================================================
   TOOLTIP – VISIBILE
   ===================================================== */
.cal-tooltip{
  position:absolute;
  left:50%;
  bottom:100%;
  transform:translateX(-50%);
  background:#ffffff;
  color:#111827;              /* ✅ TESTO VISIBILE */
  border-radius:12px;
  padding:12px 16px;
  font-size:14px;
  box-shadow:0 12px 30px rgba(0,0,0,0.3);
  max-width:260px;
  white-space:normal;
  opacity:0;
  pointer-events:none;
  z-index:200;
}

.cal-day:hover .cal-tooltip,
.cal-day.is-open .cal-tooltip{
  opacity:1;
}

/* =====================================================
   MOBILE – FULL WIDTH
   ===================================================== */
@media (max-width: 768px){
  .cal-weekdays,
  .cal-grid{
    max-width:100%;
  }
}
