﻿html, body {
    font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #0072c6;
    color: white; /* Testo bianco per default */
}

/* Link e bottoni */
a, .btn-link {
    color: white;
    text-decoration: underline;
}

.inactive {
    color: white !important;
}

/* Focus coerente con login */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Rimuovere padding superfluo se non necessario */
.content {
    padding-top: 1rem;
}

/* Outline e validazioni form coerenti con lo stile login */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 2px solid #26b050;
}

.invalid {
    outline: 2px solid #e50000;
}

.validation-message {
    color: #ffdddd;
}

/* Stile checkbox uniforme con pagina login */
.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 5px;
    cursor: pointer;
}

.darker-border-checkbox.form-check-input {
    border-color: #ffffff;
}

/* Gestione errori Blazor coerente e leggibile */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

    .blazor-error-boundary::before {
        content: "?? ";
    }

    .blazor-error-boundary::after {
        content: "An error has occurred.";
        margin-left: 0.5rem;
    }

/* Contenitore Login Uniforme */
.login-container {
    height: 100vh;
    background-color: #0072c6;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

.logo {
    width: 150px;
    margin-bottom: 40px;
    object-fit: contain;
}

.login-label {
    color: white;
    font-weight: bold;
    margin-bottom: 5px;
    margin-top: 15px;
}

.login-input, .form-control {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 16px;
}

.login-button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background-color: white;
    color: #0072c6;
    border: none;
    font-weight: bold;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
}

    .login-button:hover {
        background-color: #e6e6e6;
    }



/*DEVICE*/

.device-list {
    background-color: #0070b6;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.device-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.device-img {
    max-height: 80px;
    height: auto;
    width: auto;
    border-radius: 0.5rem;
    margin-right: 1rem;
}

.device-status {
    flex-grow: 1;
}

.free {
    color: green;
    font-weight: bold;
    font-size: 1.5rem;
}

.in-use {
    color: red;
    font-weight: bold;
    font-size: 1.5rem;
}

.room-name {
    font-weight: 600;
}

.arrow {
    font-size: 2rem;
    color: #0070b6;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}

    .arrow:hover {
        color: #005c99;
        cursor: pointer;
    }


/*DEVICE SCHEDULER*/

.device-title {
    text-align: center;
    color: #0070b6;
    font-size: 1.8rem;
    margin-top: 1rem;
    font-family: 'Helvetica Neue', sans-serif;
}

.device-header {
    display: flex;
    align-items: center; /* 👈 centra verticalmente */
    gap: 1rem; /* distanza tra immagine e testo */
    justify-content: center; /* facoltativo: centra tutto orizzontalmente */
    margin-bottom: 1rem;
}

.device-schedule-img {
    height: 80px;
    border-radius: 10px;
    object-fit: contain;
}

.device-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    margin: 0;
}

.schedule-container {
    background-color: #f0f6ff;
    padding: 1rem;
    border-radius: 12px;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    background-color: #d9e8f7;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: bold;
    font-family: 'Helvetica Neue', sans-serif;
}

    .schedule-header button {
        background: transparent;
        border: none;
        font-size: 1.2rem;
        color: #0070b6;
        cursor: pointer;
    }

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Helvetica Neue', sans-serif;
}

.time-cell {
    width: 25%;
    padding: 0.5rem;
    font-weight: bold;
    color: #444;
    text-align: center;
    vertical-align:top;
}

.booking-cell {
    background-color: white;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.booked {
    background-color: #0070b6;
    color: white;
    font-weight: bold;
}


/*conferma prenotazione*/

.free-slot {
    background-color: #e6f2ff;
    cursor: pointer;
    transition: background 0.2s;
}

    .free-slot:hover {
        background-color: #cce4ff;
    }


.booking-cell {
    position: relative;
    background-color: #e6f2ff; /* blu chiaro */
    padding: 0.5rem;
    border-bottom: 1px solid #c2dff4; /* linea orizzontale */
    height: 60px;
    vertical-align: top;
}

.slot-wrapper {
    display: flex;
    flex-direction: column;
}

.slot-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: #003366;
    position: absolute;
    top: 4px;
    left: 8px;
}

.slot-booking {
    margin-top: 1.4rem; /* spazio sotto l’orario */
    background-color: #0070b6;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
}



.schedule-body {
    position: relative; /* Contenitore per il posizionamento assoluto delle prenotazioni */
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.time-column {
    width: 120px; /* Larghezza fissa per la colonna degli orari */
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.slot-column {
    padding: 8px;
    border-bottom: 1px solid #eee;
    position: relative; /* Per il posizionamento relativo delle prenotazioni all'interno della cella (opzionale) */
}

.bookings-layer {
    position: absolute;
    top: 0;
    left: 60px; /* Inizia dopo la colonna degli orari */
    width: calc(100% - 60px);
    height: 100%;
}

.booking-item {
    position: absolute;
    left: 0;
    background-color: #007bff; /* Colore di esempio */
    color: white;
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
    overflow: hidden; /* Evita che il contenuto esca */
    white-space: nowrap;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column; /* Impila il testo e i pulsanti */
    justify-content: space-between; /* Spazio tra testo e pulsanti */
    z-index: 10; /* Assicura che le prenotazioni siano sopra la griglia */
}

.booking-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

    .booking-actions button {

        padding: 5px 8px;
        font-size: 0.8em;
        border-radius: 3px;
        border: none;
        cursor: pointer;
    }

        .booking-actions button.btn-danger {
            background-color: #dc3545;
            color: white;
        }

        .booking-actions button.btn-primary {
            background-color: #007bff;
            color: white;
        }



.slot-cell {
    cursor: pointer;
    padding: 10px;
    vertical-align: top;
    border: 1px solid #ccc;
}

    .slot-cell.available:hover {
        background-color: #e8ffe8;
    }

    .slot-cell.occupied {
        background-color: #ffeaea;
    }
