/* Stili generali */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
}

.navbar-brand {
    font-weight: 600;
}

/* Stili per il login */
.login-wrap {
    margin-top: 80px;
}

/* Stili per il calendario */
.calendar-table {
    table-layout: fixed;
}

.calendar-table th {
    text-align: center;
    background-color: #f2f7ff;
    padding: 10px;
}

.calendar-day {
    height: 120px;
    vertical-align: top;
    padding: 5px;
    position: relative;
}

.empty-day {
    background-color: #f9f9f9;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.today {
    background-color: #e6f7ff;
}

/* Modifiche per la vista mensile - eventi più compatti */
.event {
    background-color: #4a89dc;
    color: white;
    border-radius: 4px;
    padding: 3px 5px;
    margin-bottom: 2px;
    font-size: 0.8em;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.calendar-day {
    height: 120px;
    vertical-align: top;
    padding: 5px;
    position: relative;
    overflow-y: auto; /* Permette lo scroll se ci sono troppe prenotazioni */
	padding-bottom: 30px !important; /* gaetano */
}

/* Stile per il pulsante elimina */
.event .btn-danger {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.1rem 0.2rem;
    font-size: 0.7em;
    display: none;
    line-height: 1;
}

.event:hover .btn-danger {
    display: block;
}

.add-booking-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    color: #4a89dc;
    font-size: 1.2em;
    opacity: 0.6;
}

.add-booking-btn:hover {
    opacity: 1;
    text-decoration: none;
}

/* Stili per la vista settimanale */
.week-calendar {
    table-layout: fixed;
}

.week-calendar th {
    text-align: center;
    background-color: #f2f7ff;
    padding: 10px;
    width: 14%;
}

.week-calendar th:first-child {
    width: 80px;
}

.time-slot {
    text-align: center;
    vertical-align: middle;
    background-color: #f9f9f9;
    font-weight: bold;
    font-size: 0.9em;
}

.booked {
    background-color: #4a89dc;
    color: white;
    position: relative;
}

.event-content {
    padding: 5px;
    height: 100%;
}

.available {
    background-color: #ffffff;
    height: 50px;
    text-align: center;
    vertical-align: middle;
}

/* Stili per la tabella utenti */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Effetti hover */
.table-striped tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Icone */
.btn-sm .fas {
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-day {
        height: 80px;
        font-size: 0.8em;
    }
    
    .event {
        padding: 2px;
        margin-bottom: 2px;
        font-size: 0.8em;
    }
    
    .day-number {
        margin-bottom: 2px;
    }
}



/* Miglioramenti per la griglia mensile */
.container {
    max-width: 1400px; /* Aumentata la larghezza massima del contenitore */
}

.calendar-table {
    width: 100%;
    table-layout: fixed;
}

.calendar-table th {
    text-align: center;
    background-color: #f2f7ff;
    padding: 12px;
    font-size: 1.1em;
    width: 14.28%; /* Garantisce che tutte le colonne abbiano la stessa larghezza */
}

.calendar-day {
    height: 140px; /* Aumentata l'altezza delle celle */
    vertical-align: top;
    padding: 8px;
    position: relative;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.day-number {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.event {
    background-color: #4a89dc;
    color: white;
    border-radius: 5px;
    padding: 4px 6px;
    margin-bottom: 4px;
    font-size: 0.85em;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Miglioramento responsive per grandi schermi */
@media (min-width: 1400px) {
    .calendar-day {
        height: 140px;
    }
    
    .event {
        /* padding: 5px 7px;
        font-size: 0.9em; */
    }
}

/* Mantenimento della responsività per schermi piccoli */
@media (max-width: 768px) {
    .calendar-day {
        height: 100px;
        padding: 4px;
    }
    
    .event {
        padding: 2px 4px;
        margin-bottom: 2px;
        font-size: 0.75em;
    }
    
    .day-number {
        margin-bottom: 4px;
        font-size: 0.9em;
    }
}