/* Immagine wave decorativa */
.wave-image {
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    margin-bottom: -100px !important;
    margin-right: -100px !important;
    z-index: -1 !important;
    pointer-events: none !important;
    max-width: 600px !important;
    width: 600px !important;
    height: auto !important;
    opacity: 0.6 !important;
}

@media screen and (max-width: 1024px) {
    .wave-image {
        max-width: 450px !important;
        width: 450px !important;
        margin-bottom: -60px !important;
        margin-right: -60px !important;
    }
}

@media screen and (max-width: 768px) {
    .wave-image {
        max-width: 300px !important;
        width: 300px !important;
        margin-bottom: -45px !important;
        margin-right: -45px !important;
    }
}

@media screen and (max-width: 480px) {
    .wave-image {
        max-width: 220px !important;
        width: 220px !important;
        margin-bottom: -30px !important;
        margin-right: -30px !important;
    }
}

@media screen and (max-width: 360px) {
    .wave-image {
        max-width: 180px !important;
        width: 180px !important;
        margin-bottom: -20px !important;
        margin-right: -20px !important;
    }
}

/* Modifica l'altezza del dialogo del modale */
.modal-dialog {
  height: 100%;
  /* Occupa il 100% dell'altezza della finestra */
  display: flex;
  align-items: center;
  /* Centra verticalmente */
  justify-content: center;
  /* Centra orizzontalmente */
}

.close {
  color: white;
  font-size: 20px;
  /* Dimensione della "X" */
  font-weight: bold;
  cursor: pointer;
}

.past-day {
  background-color: #f0f0f0 !important; /* Lieve grigio */
  opacity: 0.6; /* Riduci visibilità */
}

.past-day .new-booking-area {
  /* Rimosso pointer-events: none per permettere click verso vista giorno */
  cursor: pointer;
}

.past-day .booking-container {
  /* Gli eventi passati rimangono cliccabili per la visualizzazione */
}



.close:hover,
.close:focus {
  color: #ccc;
  /* Colore hover della "X" */
}

.tooltip-inner {
  text-align: left !important;
  border-radius: 8px !important;
}
/* Assicura che il contenuto del modale occupi tutta l'altezza */
.modal-content {
  height: auto;
  /* Altezza totale */
  display: flex;
  flex-direction: column;
  /* Disposizione verticale */
}

/* Gestisce lo spazio interno del corpo del modale */
.modal-body {
  flex: 1;
  /* Occupa lo spazio rimanente tra header e footer */
  overflow-y: auto;
  /* Abilita lo scroll interno se necessario */
}

.custom-tooltip {
  font-family: "Poppins", sans-serif !important;
  /* Imposta il font Poppins */
  --bs-tooltip-bg: rgba(253, 185, 19, 0.2) !important;
  /* Sfondo giallo chiaro come gli eventi */
  --bs-tooltip-color: #0C1314 !important;
  /* Testo nero */
  --bs-tooltip-border-radius: 8px !important;
  /* Angoli arrotondati */
  --bs-tooltip-padding-y: 10px !important;
  /* Padding verticale */
  --bs-tooltip-padding-x: 15px !important;
  --bs-tooltip-opacity: 1 !important; /* Opacità al 100% */
  /* Padding orizzontale */
  font-size: 12px !important;
  /* Dimensione del testo */
  text-align: center !important;
  border: 1px solid rgba(253, 185, 19, 0.5) !important;
  /* Bordo per migliorare visibilità */

  /* Allinea il testo al centro */
}

.custom-tooltip-bl {
  font-family: "Poppins", sans-serif !important;
  /* Imposta il font Poppins */
  --bs-tooltip-bg: #ffffff !important;
  /* Sfondo bianco */
  --bs-tooltip-color: #0C1314 !important;
  /* Testo nero */
  --bs-tooltip-border-radius: 12px !important;
  /* Angoli arrotondati */
  --bs-tooltip-padding-y: 0 !important;
  --bs-tooltip-padding-x: 0 !important;
  --bs-tooltip-opacity: 1 !important;
  /* Bootstrap default è 200px su :root: forza qui (eredita .tooltip-inner) */
  --bs-tooltip-max-width: 560px !important;

  max-width: none !important;

  font-size: 13px !important;
  text-align: left !important;
  border: 1px solid rgba(253, 185, 19, 0.55) !important;
  border-radius: 12px !important;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(253, 185, 19, 0.15) !important;
}

/* Contenuto tabellare: tooltip prenotazione — larghezza oltre il default Bootstrap 200px */
html body .tooltip.custom-tooltip-bl .tooltip-inner,
html body .tooltip.show.custom-tooltip-bl .tooltip-inner,
.booking-label-hidden + .tooltip.custom-tooltip-bl .tooltip-inner {
  padding: 0 !important;
  max-width: 560px !important;
  width: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
}

@media (max-width: 620px) {
  html body .tooltip.custom-tooltip-bl .tooltip-inner,
  html body .tooltip.show.custom-tooltip-bl .tooltip-inner,
  .booking-label-hidden + .tooltip.custom-tooltip-bl .tooltip-inner {
    max-width: calc(100vw - 24px) !important;
  }
}

.tooltip.custom-tooltip-bl .booking-tooltip-inner {
  padding: 0;
  text-align: left;
}

.tooltip.custom-tooltip-bl .booking-tooltip-title {
  margin: 0;
  padding: 8px 12px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c4a1e;
  background: transparent;
  border-bottom: 1px solid rgba(253, 185, 19, 0.4);
  border-radius: 10px 10px 0 0;
}

.tooltip.custom-tooltip-bl .booking-tooltip-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin: 0;
  border: 1px solid rgba(253, 185, 19, 0.42);
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.tooltip.custom-tooltip-bl .booking-tooltip-table tbody tr:not(:last-child) th,
.tooltip.custom-tooltip-bl .booking-tooltip-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.tooltip.custom-tooltip-bl .booking-tooltip-table th {
  text-align: left;
  font-weight: 600;
  color: #5a4d2e;
  padding: 6px 8px 6px 10px;
  width: 30%;
  vertical-align: top;
  white-space: nowrap;
  border-right: 1px solid rgba(253, 185, 19, 0.28);
  background: transparent;
}

.tooltip.custom-tooltip-bl .booking-tooltip-table td {
  padding: 6px 10px 6px 8px;
  color: #212529;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-weight: 500;
  min-width: 0;
  background: transparent;
}

/* Variante tooltip “nascosto” (stessa struttura, senza sfondi) */
.booking-label-hidden + .tooltip.custom-tooltip-bl .booking-tooltip-title {
  color: #444;
  background: transparent;
  border-bottom-color: #bbb;
  border-radius: 10px 10px 0 0;
}

.booking-label-hidden + .tooltip.custom-tooltip-bl .booking-tooltip-table {
  border-color: #b0b0b0;
  border-top: none;
}

.booking-label-hidden + .tooltip.custom-tooltip-bl .booking-tooltip-table tbody tr:not(:last-child) th,
.booking-label-hidden + .tooltip.custom-tooltip-bl .booking-tooltip-table tbody tr:not(:last-child) td {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.booking-label-hidden + .tooltip.custom-tooltip-bl .booking-tooltip-table th {
  color: #3a3a3a;
  border-right-color: #c0c0c0;
  background: transparent !important;
}

.booking-label-hidden + .tooltip.custom-tooltip-bl .booking-tooltip-table td {
  color: #2a2a2a;
  background: transparent;
}

.custom-tooltip-hidden {
  border: 2px solid #bbb !important;
  background-color: #e0e0e0 !important;
  color: #333 !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

/* Forza il border-radius su tutti i tooltip */
.tooltip .tooltip-inner {
  border-radius: 8px !important;
}

/* Forza il border-radius su tutti i tooltip Bootstrap */
.tooltip-inner {
  border-radius: 8px !important;
}

/* Forza il border-radius anche sui tooltip generati dinamicamente */
[data-bs-toggle="tooltip"] + .tooltip .tooltip-inner {
  border-radius: 8px !important;
}

/* Regola con massima specificità per tutti i tooltip Bootstrap */
.tooltip .tooltip-inner,
.tooltip-inner,
[data-bs-toggle="tooltip"] + .tooltip .tooltip-inner,
.tooltip.show .tooltip-inner {
  border-radius: 8px !important;
  -webkit-border-radius: 8px !important;
  -moz-border-radius: 8px !important;
}

/* SOVRASCRITTURA TOTALE PER I TOOLTIP - MASSIMA PRIORITÀ */
.tooltip-inner,
.tooltip .tooltip-inner,
.tooltip.show .tooltip-inner,
[data-bs-toggle="tooltip"] + .tooltip .tooltip-inner,
.tooltip-inner[style*="border-radius"],
.tooltip .tooltip-inner[style*="border-radius"] {
  border-radius: 8px !important;
  -webkit-border-radius: 8px !important;
  -moz-border-radius: 8px !important;
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

/* ULTIMA RISORSA - SELEZTORI CON MASSIMA SPECIFICITÀ */
html body .tooltip .tooltip-inner,
html body .tooltip-inner,
html body .tooltip.show .tooltip-inner,
html body [data-bs-toggle="tooltip"] + .tooltip .tooltip-inner {
  border-radius: 8px !important;
  -webkit-border-radius: 8px !important;
  -moz-border-radius: 8px !important;
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

/* FORZA TOTALE - ATTRIBUTO STYLE DIRETTO */
.tooltip-inner[style] {
  border-radius: 8px !important;
  -webkit-border-radius: 8px !important;
  -moz-border-radius: 8px !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif !important;
}

.navbar {
  margin: 0;
  width: 100%;
}

.content {
  width: 100%; /* Cambiato da 80% a 100% */
  margin: auto;
  text-align: center;
  padding: 0 10px; /* Ridotto padding */
}

.calendar-table {
  table-layout: fixed;
  width: 100%; /* Larghezza al 100% della pagina */
  margin: 0 auto;
  border-spacing: 6px;
  border-collapse: separate;
  transition: opacity 0.3s ease-in-out;
  background-color: transparent;
  position: relative;
  z-index: 1;
  /* Assicura che la tabella sia sopra la wave */
}

.calendar-cell {
  width: calc(100% / 7); /* Larghezza proporzionale per 7 colonne */
  height: 130px; /* Aumentato da 110px a 130px */
  vertical-align: top;
  position: relative;
  cursor: pointer;
  /* Cambia il cursore in una manina */
  transition: none !important;
  /* Rimuovo completamente la transizione per evitare scalini */
  background-color: #ffffff !important;
  /* Sfondo solido bianco per non essere coperto dalla wave */
  overflow: hidden;
  /* Nasconde il contenuto che esce dal box */
  border-radius: 6px;
  z-index: 1;
  /* Assicura che sia sopra la wave (z-index: -1) */
}

/* Sfondo pieno (no alpha): evita che la wave sotto traspaia come con rgba(..., 0.1) */
.calendar-cell:hover:not(.past-day):not(.disabled) {
  background-color: #fef8e9 !important;
  transition: background-color 0.2s ease !important;
}

.calendar-cell.disabled {
  cursor: not-allowed;
  /* Disabilita il cursore per date < oggi */
  background-color: #f8f9fa;
  /* Sfondo neutro per celle disabilitate */
}

.calendar-cell.past-day {
  background-color: rgba(200,200,200,0.85) !important;
}

.calendar-table tbody td:empty {
  visibility: hidden;
}

.day-number {
  font-weight: bold;
  font-size: 0.8rem; /* Ridotto ulteriormente */
  position: relative;
  top: 0;
  left: 0;
  margin-top: 5px;
  margin-left: 6px;
  margin-bottom: 8px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.booking-info {
  font-size: small;
  margin-top: 10px;
  color: #555;
}

.meeting-button {
  background-color: #FDB913;
  color: #0C1314;
  padding: 12px 24px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  margin-top: 15px;
  width: 180px;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s, opacity 0.3s ease-in-out;
}

.meeting-button:hover {
  background-color: #E5A500;
}





.month-cal {
  color: #FDB913;
  display: inline-block;
  margin-left: 25px;
  margin-right: 25px;
  margin-bottom: 0;
  font-size: 17px;
  vertical-align: middle;
}

/* Loader per cambio mese */
.month-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background-color: #f8f9fa;
  border-radius: 15px;
  margin: 20px 0;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.month-loader.show {
  opacity: 1;
}

.loader-content {
  text-align: center;
  padding: 40px;
}

/* Modal Status Sale: larghezza come modal-xl Bootstrap (no 85vw che dilata il box e fa sembrare il testo “zoom out”) */
.status-modal-custom {
  max-height: min(85vh, 100vh - 2rem);
}

.status-modal-custom .modal-content {
  max-height: min(85vh, 100vh - 2rem);
  height: min(85vh, 100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.status-modal-custom .modal-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important per flexbox */
}

.status-modal-custom .table-responsive {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 12px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  background-color: white;
  /* Scroll personalizzato */
  scrollbar-width: thin;
  scrollbar-color: #FDB913 #f8f9fa;
}

.status-modal-custom .table-responsive::-webkit-scrollbar {
  width: 8px;
}

.status-modal-custom .table-responsive::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}

.status-modal-custom .table-responsive::-webkit-scrollbar-thumb {
  background: #FDB913;
  border-radius: 4px;
}

.status-modal-custom .table-responsive::-webkit-scrollbar-thumb:hover {
  background: #E5A500;
}

.status-modal-custom .modal-header {
  flex-shrink: 0;
  border-bottom: 2px solid #0C1314;
}

.status-modal-custom .modal-footer {
  flex-shrink: 0;
  border-top: 2px solid #FDB913;
}

.status-modal-custom #statusLoading {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.status-modal-custom #statusError {
  margin: 12px;
  flex-shrink: 0;
  font-size: 1rem;
}

/* Modal Booking personalizzato - per prenotazione e dettagli */
.booking-modal-custom {
  max-width: 900px;
  width: 90vw;
  max-height: calc(100vh - 30px);
  margin: 15px auto;
}

/* Rimuovi il margin dei modali che causa lo scroll verticale, ma mantieni il centraggio */
@media (min-width: 576px) {
  .booking-modal-custom.modal,
  #bookRoomModal.modal,
  #viewRoomModal.modal {
    --bs-modal-margin: 0 !important;
    margin: 0 !important;
  }
  
  .booking-modal-custom .modal-dialog,
  #bookRoomModal .modal-dialog,
  #viewRoomModal .modal-dialog {
    margin: 1.75rem auto !important;
  }
  
  .booking-modal-custom.modal-dialog-centered,
  #bookRoomModal .modal-dialog.modal-dialog-centered,
  #viewRoomModal .modal-dialog.modal-dialog-centered {
    margin: 1.75rem auto !important;
  }
}

.booking-modal-custom .modal-content {
  max-height: calc(100vh - 30px);
  display: flex;
  flex-direction: column;
  margin: 0;
}

.booking-modal-custom .modal-body {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.booking-modal-custom .container {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.booking-modal-custom .rounded-top {
  flex-shrink: 0;
  margin: 0;
  border-radius: 0.375rem 0.375rem 0 0 !important;
}

.booking-modal-custom form {
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  flex: 1;
  min-height: 0;
}

.booking-modal-custom .mb-3 {
  margin-bottom: 0.5rem !important;
}

.booking-modal-custom .mb-2 {
  margin-bottom: 0.5rem !important;
}

.booking-modal-custom .form-label {
  margin-bottom: 0.4rem !important;
  font-size: 14px;
  font-weight: 600;
}

.booking-modal-custom .form-control,
.booking-modal-custom .form-select {
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  min-height: 38px;
}

.booking-modal-custom textarea.form-control {
  min-height: 80px;
  resize: none;
  font-size: 14px;
}

.booking-modal-custom .meeting-button {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 16px;
  padding: 10px 20px;
}

/* Scroll personalizzato per il form */
.booking-modal-custom form::-webkit-scrollbar {
  width: 6px;
}

.booking-modal-custom form::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.booking-modal-custom form::-webkit-scrollbar-thumb {
  background: #FDB913;
  border-radius: 3px;
}

.booking-modal-custom form::-webkit-scrollbar-thumb:hover {
  background: #E5A500;
}

.booking-label {
  padding: 2px;
  padding-left:4px !important;
  padding-right:4px !important;
  border-radius: 4px;
  width: 90%;
  margin: 0 auto;
  text-align: left;
  font-size: 11px;
  z-index: 999999;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 2px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.booking-label-hidden {
  color: #333 !important;
  background-color: #e0e0e0 !important;
  text-decoration: none !important;
}
.booking-label-hidden[data-bs-toggle="tooltip"] + .tooltip .tooltip-inner,
.booking-label-hidden .tooltip-inner,
.booking-label-hidden + .tooltip .tooltip-inner,
.booking-label-hidden .custom-tooltip-bl,
.booking-label-hidden + .tooltip .custom-tooltip-bl {
  background-color: #e0e0e0 !important;
  color: #333 !important;
  border: 2px solid #bbb !important;
  box-shadow: none !important;
}

.filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.filters-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.filters select {
  min-width: 150px;
  max-width: 200px;
  flex-shrink: 0;
  font-size: 14px;
  padding: 6px 10px;
}

.filters .form-inline {
  margin: 0;
}

.filters .view-toggle-container {
  flex-shrink: 0;
  margin-left: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-booking-area {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1; /* Posiziona sotto le booking-label */
  background-color: transparent; /* Area trasparente cliccabile */
  cursor: pointer; /* Cambia il cursore in una manina */
}

.booking-container {
  position: relative;
  z-index: 2; /* Posiziona sopra la new-booking-area */
  max-height: 85px; /* Ridotto da 100px */
  margin-top: 2px; /* Ridotto il margin tra gli eventi */
  overflow-y: auto;
  overflow-x: hidden;
  /* Nasconde la scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  margin-top: 12px;
}

/* Nasconde la scrollbar per WebKit browsers */
.booking-container::-webkit-scrollbar {
  display: none;
}

/* Indicatore di scroll con freccia animata */
.booking-container.has-scroll::after {
  display: none !important;
}

.booking-container {
  overflow-y: scroll !important;
  scrollbar-width: auto !important;
  scrollbar-color: #FDB913 transparent !important;
}

.booking-container::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
.booking-container::-webkit-scrollbar-thumb {
  background: #FDB913;
  border-radius: 4px;
}

/* Classe per il giorno corrente con ombreggiatura pulsante */
.calendar-cell.today {
  animation: pulse-yellow-box 1.8s infinite;
}

/* Il giorno corrente usa le stesse proprietà del .day-number generale */

@keyframes pulse-yellow-box {
  0% {
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10), 0 1.5px 4px 0 rgba(0,0,0,0.08), 0 0 0 0 rgba(253, 185, 19, 0.7);
  }
  70% {
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10), 0 1.5px 4px 0 rgba(0,0,0,0.08), 0 0 0 12px rgba(253, 185, 19, 0);
  }
  100% {
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10), 0 1.5px 4px 0 rgba(0,0,0,0.08), 0 0 0 0 rgba(253, 185, 19, 0);
  }
}

@keyframes pulse-yellow-day {
  0% {
    box-shadow: 0 0 0 0 rgba(253, 185, 19, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(253, 185, 19, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(253, 185, 19, 0);
  }
}

/* Responsive per schermi più piccoli */
@media (max-width: 900px) {
  .calendar-table {
    width: 100%;
    border-spacing: 2px;
  }
  
  .calendar-cell,
  .calendar-table tbody td {
    width: calc(100% / 7);
    height: 120px; /* Aumentato da 100px a 120px */
  }
}

@media (max-width: 600px) {
  .calendar-cell,
  .calendar-table tbody td {
    height: 100px; /* Aumentato da 80px a 100px */
  }
  
  .booking-container {
    max-height: 80px; /* Aumentato da 60px a 80px */
  }
  
  .day-number {
    font-size: 12px;
    top: 2px;
    left: 2px;
  }
}

.filters .month-navigation {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.month-navigation .month-col {
  flex-grow: 1;
  text-align: center;
}

.month-navigation .month-buttons {
  text-align: right;
}

.month-buttons a {
  margin-left: 8px;
  font-size: 14px;
  padding: 6px 12px;
}

.navbar .text-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  /* Assicura che occupi l'intera altezza della navbar */
}

/* Stili per bottoni gialli con testo nero */
.btn-primary {
  background-color: #FDB913 !important;
  border-color: #FDB913 !important;
  color: #0C1314 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #E5A500 !important;
  border-color: #E5A500 !important;
  color: #0C1314 !important;
  box-shadow: 0 4px 8px rgba(229, 165, 0, 0.3) !important;
}

/* Override globale per tutti i button gialli */
button:not(.btn-danger):not(.btn-secondary):hover,
.btn:not(.btn-danger):not(.btn-secondary):hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background-color: #E5A500 !important;
  border-color: #E5A500 !important;
  color: #0C1314 !important;
  box-shadow: 0 2px 4px rgba(229, 165, 0, 0.2) !important;
}

/* Stili per il modale Status (nessun transform: scale — lascia l’animazione/transform di Bootstrap 5) */
#statusModal .modal-content {
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

#statusModal .modal-header {
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 10px 15px;
}

#statusModal .modal-title {
  font-size: 1.125rem;
}

#statusModal .modal-footer {
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
  margin-bottom: 0 !important;
  padding: 8px 15px !important;
  border-bottom: none !important;
}

#statusModal .modal-footer .btn {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
}
#statusModal .modal-content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
#statusModal .modal-dialog {
    max-height: min(85vh, 100vh - 2rem) !important;
    min-height: 0 !important;
    margin: 1.75rem auto !important;
}
/* Stessa altezza del box status (non height:100% che collassa senza altezza sul dialog) */
#statusModal .modal-content {
    height: min(85vh, 100vh - 2rem) !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
}
#statusModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    max-height: none !important;
    font-size: 1rem;
}

#statusModal .table {
  font-size: 1rem;
}
#statusModal .modal-footer {
    margin-top: auto;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

/* Animazione per lo spinner */
.spinner-border {
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Hover effect per le righe della tabella status */
#statusModal .table tbody tr:hover {
  background-color: rgba(253, 185, 19, 0.1);
  transition: background-color 0.2s ease;
}

/* Stili per i badge di disponibilità */
#statusModal .table td span {
  display: inline-block;
  transition: all 0.2s ease;
}

#statusModal .table td span:hover {
  transform: scale(1.05);
}

/* Stili per eventi passati nel modale di visualizzazione */
#pastEventInfo {
  background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
  border-left: 4px solid #6c757d;
  border-radius: 8px;
  font-size: 14px;
  margin: 10px 0;
  animation: fadeInUp 0.3s ease;
}

#pastEventInfo i {
  color: #6c757d;
  margin-right: 8px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Transizione smooth per i colori dell'header del modale */
#viewRoomModal .rounded-top {
  transition: background-color 0.3s ease, color 0.3s ease;
}

#viewRoomModal .rounded-top h3,
#viewRoomModal .rounded-top span {
  transition: color 0.3s ease;
}

/* Disabilita lo scroll nel modale del dettaglio evento */
#viewRoomModal .modal-body {
  overflow-y: visible !important;
  max-height: none !important;
}

/* Logo e punto quadrato TWY */
.header-logo {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.dot-square {
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #FDB913;
  border-radius: 0 0 2px 0;
  margin-left: -9px;
  position: relative;
  top: 6px;
  transform: rotate(0deg);
  letter-spacing: 0;
}

.dot-square-medium {
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #FDB913;
  border-radius: 0 0 1px 0;
  margin-left: 1px;
  position: relative;
  top: 6px;
  transform: rotate(0deg);
}

.navbar-brand-text {
  font-size: 19px;
  font-weight: 600;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.navbar-brand-text .dot-square {
  margin-left: -9px;
}



/* RIMOSSE regole .success-checkmark, .check-icon, .icon-line, .icon-circle, .icon-fix, e le keyframes correlate */

/* Stili aggiuntivi per la tabella calendario */
.calendar-table thead th {
  background: linear-gradient(135deg, #343a40 0%, #495057 100%);
  color: white;
  padding: 10px 6px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  border: none;
  border-radius: 6px;
}

.calendar-table tbody td,
.calendar-cell {
  width: 120px;
  height: 130px;
  padding: 0;
  box-sizing: border-box;
  vertical-align: top;
  border-radius: 6px;
  box-shadow: 0 1px 6px 0 rgba(0,0,0,0.08), 0 1px 3px 0 rgba(0,0,0,0.06);
  background-color: #ffffff !important;
  /* Sfondo solido bianco per non essere coperto dalla wave */
  z-index: 1;
  /* Assicura che sia sopra la wave (z-index: -1) */
  position: relative;
}

.calendar-cell.past-day {
  background-color: #d6d6d6;
}

#statusContent { display: block; }
#statusLoading {
    display: none;
    min-height: 120px;
    padding: 30px 0;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    box-shadow: none !important;
}
#statusLoading[style*="display: flex"] {
    display: flex !important;
}
#statusContent th {
    cursor: pointer;
    user-select: none;
    position: relative;
}
#statusContent th.asc::after {
    content: ' \25B2'; /* freccia su */
    font-size: 12px;
}
#statusContent th.desc::after {
    content: ' \25BC'; /* freccia giù */
    font-size: 12px;
}
.edit-room-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.edit-room-btn i.fas.fa-edit {
    color: #222 !important;
    font-size: 16px;
    transition: color 0.2s;
}
.edit-room-btn:hover, .edit-room-btn:focus {
    background: rgba(220,220,220,0.8) !important;
    box-shadow: none !important;
}
.edit-room-btn:hover i.fas.fa-edit,
.edit-room-btn:focus i.fas.fa-edit {
    color: #222 !important;
}

/* Overlay scuro per i modali di aggiunta/modifica sala */
.modal-backdrop.show {
    background-color: #222 !important;
    opacity: 0.7 !important;
}

/* Stili generali per tutti i modali - riduzione dimensioni */
.modal-header {
  padding: 10px 15px !important;
}

.modal-title {
  font-size: 16px !important;
  font-weight: 600 !important;
}

.modal-body {
  padding: 12px 15px !important;
  font-size: 13px;
}

.modal-footer {
  padding: 10px 15px !important;
}

.modal-footer .btn {
  font-size: 13px;
  padding: 6px 12px;
}

/* Modali edit/add room */
#editRoomModal .modal-body,
#addRoomModal .modal-body {
  padding: 12px 15px !important;
}

#editRoomModal .form-label,
#addRoomModal .form-label {
  font-size: 12px;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

#editRoomModal .form-control,
#editRoomModal .form-select,
#addRoomModal .form-control,
#addRoomModal .form-select {
  font-size: 13px;
  padding: 0.3rem 0.6rem;
  min-height: 32px;
}

#editRoomModal .mb-3,
#addRoomModal .mb-3 {
  margin-bottom: 0.6rem !important;
}

#editRoomModal .alert,
#addRoomModal .alert {
  font-size: 11px;
  padding: 8px 12px;
  margin-bottom: 0.5rem;
}

#editRoomModal .form-text,
#addRoomModal .form-text {
  font-size: 11px;
}

/* Modale gestione utenti */
#userManagementModal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

#userManagementModal .modal-dialog {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#userManagementModal .modal-content {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#userManagementModal .modal-dialog {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#userManagementModal .modal-content {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#userManagementModal .modal-body {
  padding: 12px 15px !important;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

#userManagementModal .modal-title {
  font-size: 16px !important;
}

#userManagementModal .table {
  font-size: 13px;
}

#userManagementModal .table th,
#userManagementModal .table td {
  padding: 8px 10px;
}

#userManagementModal .form-control {
  font-size: 13px;
  padding: 0.3rem 0.6rem;
  min-height: 32px;
}

#userManagementModal .btn {
  font-size: 13px;
  padding: 6px 12px;
}

#statusModal .btn-close {
    color: #111 !important;
    opacity: 0.7;
    transition: color 0.2s, opacity 0.2s;
}
#statusModal .btn-close:hover,
#statusModal .btn-close:focus {
    filter: none !important;
    color: #111 !important;
    opacity: 1 !important;
}
#statusModal td {
    vertical-align: middle !important;
}
#statusContent thead, #statusContent thead tr, #statusContent thead th {
    background: #fff !important;
    color: #111 !important;
    font-weight: bold !important;
    border-bottom: 2px solid #111 !important;
}

/* Overlay per modale edit/add room sopra Status Sale */
#editRoomOverlay, #addRoomOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  display: none;
}

/* Switch stile iOS per visibilità sala */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  vertical-align: middle;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #FDB913;
}
input:checked + .slider:before {
  transform: translateX(16px);
}

.room-hidden {
  opacity: 0.5;
}

.action-btn {
  margin-right: 12px;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.action-btn:last-child {
  margin-right: 0;
}

.calendar-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-loader-spinner {
  border: 6px solid #eee;
  border-top: 6px solid #FDB913;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#monthLoader {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 9999999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1 !important;
  transition: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#monthLoader.show {
  opacity: 1 !important;
}
#monthLoader .loader-content {
  margin: 0 !important;
  padding: 0 !important;
}
#monthLoader .spinner-border {
  margin: 0 !important;
}

/* Toggle iOS-style per vista Mese/Giorno */
.view-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 8px 0;
}

.view-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: #0C1314;
  margin: 0;
  user-select: none;
  font-family: "Poppins", sans-serif;
}

.ios-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  vertical-align: middle;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #FDB913;
  transition: .4s;
  border-radius: 30px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 0 2px rgba(253, 185, 19, 0.2);
}

.ios-switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.ios-switch input:checked + .ios-switch-slider {
  background-color: #FDB913;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 0 2px rgba(253, 185, 19, 0.2);
}

.ios-switch input:checked + .ios-switch-slider:before {
  transform: translateX(20px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.ios-switch:hover .ios-switch-slider {
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.ios-switch input:focus + .ios-switch-slider {
  outline: 2px solid #FDB913;
  outline-offset: 2px;
}

/* Vista Giorno */
.day-view-container {
  display: flex;
  width: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  margin-top: 20px;
  position: relative;
  min-height: 800px;
  border: 1px solid #e9ecef;
}

.day-view-time-column {
  width: 90px;
  flex-shrink: 0;
  background: #f8f9fa;
  border-right: 3px solid #FDB913;
  box-shadow: 2px 0 8px rgba(0,0,0,0.05);
  overflow: visible;
  padding-top: 0;
  position: sticky;
  left: 0;
  z-index: 100; /* Molto alto per rimanere sempre sopra durante lo scroll */
}

.day-view-time-column-header {
  position: sticky;
  top: 0;
  z-index: 101; /* Ancora più alto per restare sopra tutto */
  background: #f8f9fa;
  border-bottom: 2px solid #adb5bd;
}

.day-view-time-slot {
  height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 12px;
  position: relative;
}

.day-view-time-slot:first-child {
  overflow: visible;
}

.day-view-time-slot:last-child {
}

.day-view-time-slot .time-label {
  font-size: 13px;
  font-weight: 700;
  color: #0C1314;
  font-family: "Poppins", sans-serif;
  padding: 4px 8px;
  border-radius: 4px;
  position: absolute;
  top: -20px;
  right: 12px;
  z-index: 5;
}

.day-view-time-slot:first-child .time-label {
  top: -20px;
}

.day-view-bookings-column {
  flex: 1;
  position: relative;
  padding-top: 0;
  background: #ffffff;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      #f0f0f0 59px,
      #f0f0f0 60px
    );
}

.day-view-bookings-container {
  position: relative;
  width: 100%;
  min-height: 800px;
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 12px;
  padding-bottom: 20px;
}

.day-booking-label {
  position: absolute;
  left: 3px;
  right: 3px;
  padding: 6px 10px;
  margin-top: 3px;
  margin-bottom: 3px;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  z-index: 10;
  border: none;
  border-left: 4px solid #FDB913;
  min-height: 54px;
  background-color: #FFF9E6 !important;
  box-sizing: border-box;
}

.day-booking-label:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  z-index: 20;
}

.day-booking-label-hidden {
  opacity: 0.85;
  border-left-color: #bbb;
  background-color: #e8e8e8 !important;
}

.day-booking-label-hidden:hover {
  opacity: 0.95;
}

.day-booking-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
}

.day-booking-title {
  font-weight: 700;
  color: #0C1314;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.day-booking-title i {
  color: #FDB913;
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.day-booking-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

.day-booking-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}

.day-booking-info {
  font-size: 11px;
  color: #495057;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-booking-info:nth-child(2) {
  justify-content: flex-end;
  text-align: right;
}

.day-booking-info i {
  color: #FDB913;
  font-size: 11px;
  flex-shrink: 0;
}

.day-booking-info span {
  color: #495057;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Linea rossa orizzontale per l'orario corrente nella vista giorno */
.day-view-current-time-line {
  position: absolute;
  left: 36px; /* Parte dopo il badge, leggermente più a destra */
  height: 2px;
  background: #dc3545;
  z-index: 10; /* Sotto il badge */
  pointer-events: none;
  box-shadow: 0 0 4px rgba(220, 53, 69, 0.5);
  animation: pulse-opacity 5s ease-in-out infinite;
  width: 100%; /* Default, verrà sovrascritto da JS per estendersi su tutta la tabella */
}

@keyframes pulse-opacity {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.day-view-current-time-label {
  position: absolute;
  left: -9px; /* Posizionato leggermente più a destra */
  top: -10px;
  background: #dc3545;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  z-index: 25; /* Sopra tutto */
  pointer-events: none;
  font-family: "Poppins", sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
}

/* Responsive per barra filtri */
@media (max-width: 1200px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-left {
    width: 100%;
  }
  
  .filters-row {
    width: 100%;
  }
  
  .filters select {
    flex: 1;
    min-width: 150px;
  }
  
  .month-navigation {
    width: 100% !important;
    margin-top: 15px;
    margin-left: 0 !important;
    justify-content: center !important;
  }
  
  .month-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .filters {
    margin-bottom: 15px;
  }
  
  .filters select {
    min-width: 100%;
  }
  
  .view-toggle-container {
    gap: 8px;
    padding: 6px 0;
    width: 100%;
  }
  
  .view-toggle-label {
    font-size: 13px;
  }
  
  .ios-switch {
    width: 48px;
    height: 28px;
  }
  
  .ios-switch-slider:before {
    height: 22px;
    width: 22px;
  }
  
  .ios-switch input:checked + .ios-switch-slider:before {
    transform: translateX(20px);
  }
  
  .month-navigation {
    flex-direction: column;
  }
  
  .month-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .month-cal {
    margin: 10px 0;
  }
  
  .day-view-container {
    flex-direction: column;
    border-radius: 8px;
  }
  
  .day-view-time-column {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding-top: 0;
    border-right: none;
    border-bottom: 3px solid #FDB913;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
  }
  
  .day-view-time-slot {
    min-width: 70px;
    height: 45px;
    border-right: 1px solid #e9ecef;
    border-bottom: none;
    padding-right: 8px;
    justify-content: center;
  }
  
  .day-view-time-slot .time-label {
    font-size: 12px;
    padding: 3px 6px;
  }
  
  .day-booking-content {
    font-size: 11px;
    gap: 4px;
  }
  
  .day-booking-title {
    font-size: 13px;
  }
  
  .day-booking-header {
    font-size: 10px;
  }
}
