﻿/* Body Styles */
body {
    padding-bottom: 0;
}

/* ===== Scaling UI su schermi piccoli (portatili) — approccio rem =====
   Il BackOffice è tarato per desktop. Su viewport più strette riduciamo il
   font-size della radice: tutto ciò che è in `rem` (in primis la tipografia
   del tema, qui volutamente grande) si rimpicciolisce in proporzione.
   Niente zoom/transform → nessun componente si comporta male.
   I desktop massimizzati (>1600px) restano a 16px (100%).
   Nota: gli spacing/altezze in px di MudBlazor non scalano da qui. */
@media (max-width: 1600px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 1366px) {
    html {
        font-size: 13px;
    }
}

/* Loading Image */
#loading-img-wrapper {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

    #loading-img-wrapper > img {
        width: 250px;
        height: auto;
        animation: pulse 2s ease-in-out infinite;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* App Layout */
#app {
    height: 100%;
}

main {
    /* Riempie l'altezza della viewport (MudMainContent ha box-sizing border-box
       e padding-top pari all'appbar, quindi 100vh non genera scroll spurio). */
    min-height: 100vh;
    overflow-x: unset;
}

.small-input-text .mud-input > input.mud-input-slot {
    font-size: 0.75rem;
    height: 0px;
    padding: 15px;
}

.mud-input > input.mud-input-root {
    font-size: 0.75rem;

}

/* ReadOnlyField: lo slot di MudBlazor è dimensionato per un <input> di una riga
   (height: 1lh; overflow: hidden; white-space: nowrap). Il valore qui è testo libero, che va
   mandato a capo dentro il bordo invece di sbordare. overflow-wrap: anywhere serve ai valori
   senza spazi, come gli URL. */
.readonly-field .mud-input-slot.mud-input-root {
    height: auto;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
}

.small-date-picker .mud-picker {
    font-size: 0.75rem; /* Imposta il font-size a 12px per il contenuto interno */

}

.small-date-picker input {
    font-size: 0.75rem; /* Imposta il font-size a 12px per l'input field */

}

.small-date-picker .mud-input {
    font-size: 0.75rem; /* Font-size per i campi input */
    min-width: 150px;
}


.small-select .mud-select{
    font-size: 0.75rem;

}
.small-select input {
    font-size: 0.75rem; /* Imposta il font-size a 12px per l'input field */
}

.small-select .mud-input {
    font-size: 0.875rem;
    min-width: 120px;
}

.mud-table-cell {
    font-size: 0.95rem !important;
}

.main-app-bar {
    border-bottom: 5px solid #FF6600 !important;
}

.type-column {
    min-width: 150px;
}


.mud-table-root .mud-table-head .mud-table-row .mud-table-cell {
    background-color: var(--mud-palette-primary);
    color: #fff !important;
}

.mud-table-root .mud-table-sort-label:hover {
    color: #fff !important;
    font-weight: 700 !important;
}

/* NB: le varianti per il tema SCURO di queste regole stanno in css/shell-refactor.css,
   sotto il selettore :root[data-theme="dark"]. */