html, body {
    font-family: 'Museo Sans', Arial, Helvetica, sans-serif;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: url('/img/IMI-Purple-Pattern-Graphic-Crop-4_CMYK.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    opacity: 0.2;
    pointer-events: none;
}

@font-face {
    font-family: 'Museo Sans';
    src: url('/fonts/MuseoSans_100.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Museo Sans';
    src: url('/fonts/MuseoSans_300.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Museo Sans';
    src: url('/fonts/MuseoSans_500.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Museo Sans';
    src: url('/fonts/MuseoSans_700.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Museo Sans';
    src: url('/fonts/MuseoSans_900.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'MuseoSans100';
    src: url('/fonts/MuseoSans_100.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

h1:focus {
    outline: none;
}

a {
    text-decoration: none !important; /* Rimuove la sottolineatura da tutti i link */
}

a, .btn-link {
    color: #0071c1;
    text-decoration: none !important; /* Rimuove la sottolineatura da tutti i link */
}

.btn-primary {
    color: #f5f6f5;
    background-color: #512D6D;
    border-color: #e3ddd4;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .appbar-title-responsive {
        font-size: 0.8rem !important;
        font-weight: 300;
        line-height: 1.1;
        white-space: normal;
        word-break: break-word;
    }
}

@media (min-width: 601px) {
    .appbar-title-responsive {
        font-size: 1.5rem;
        font-weight: 500;
    }
}
/* Nasconde la label su desktop, la mostra solo su mobile */
.mobile-only-label {
    display: none;
}

@media (max-width: 600px) {
    /* Forza tutte le celle della MudTable ad allinearsi a sinistra su mobile */
    .mud-table .mud-table-cell,
    .mud-table .mud-td,
    .mud-table td,
    .mud-table th {
        text-align: left !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }

    /* Allinea checkbox e label in riga e a sinistra */
    .mobile-checkbox-td {
        text-align: left !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        vertical-align: middle !important;
    }

    .mobile-checkbox-td .mud-checkbox-root {
        margin-right: 0.5rem;
        vertical-align: middle;
        display: inline-block;
    }

    .mobile-only-label {
        display: inline-block !important;
        font-size: 0.85rem;
        vertical-align: middle;
        word-break: break-word;
    }
}

@media (max-width: 600px) {
    .matrix-table .mud-table-cell,
    .matrix-table .mud-td,
    .matrix-table td,
    .matrix-table th {
        text-align: left !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }
    /* Pił specifico: forza a sinistra solo le celle con la classe center-checkbox-desktop */
    .matrix-table td.center-checkbox-desktop,
    .matrix-table .mud-td.center-checkbox-desktop {
        text-align: left !important;
    }
}

.center-checkbox-desktop {
    text-align: center !important;
    vertical-align: middle !important;
}

@media (max-width: 600px) {
    .center-checkbox-desktop {
        text-align: left;
    }
}

.appbar-imi-logo {
    height: 40px;
    margin-left: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .appbar-imi-logo {
        display: none !important;
    }
}

.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;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.museo-sans-light {
    font-family: 'MuseoSans100', 'Museo Sans', Arial, Helvetica, sans-serif !important;
    font-weight: 100 !important;
    letter-spacing: 0.01em;
}

.card-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.categories-flex-row > .card-container {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.card {
    margin-top: -10px;
    position: relative;
    z-index: 1;
}

.card:first-child {
    margin-top: 0;
}

.card:not(:last-child)::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px; /* altezza della sfumatura */
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 100%);
    z-index: 2;
}

.categories-flex-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    align-items: start;
}

.category-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.matrix-header-title {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    height: 100%;
    overflow: visible;
}

.matrix-header-label {
    align-self: flex-start;
    margin-top: auto;
    font-size: 1rem;
    font-weight: 400;
    margin-left: 0.25rem;
    margin-bottom: 0.15rem;
    transition: font-weight 0.2s, margin 0.2s;
}

/* Quando collapsed, font-weight pił leggero e pił margine */
.matrix-table th[colspan="1"] .matrix-header-label {
    font-weight: 300;
    margin-left: 0.5rem;
    margin-bottom: 0.3rem;
}

.matrix-header-flexrow {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 110px;
    max-width: 220px;
    gap: 0.25rem;
    padding-right: 0.5rem;
    overflow: hidden;
}

.matrix-header-flexrow .mud-icon-button {
    margin-right: 0.5rem;
    margin-left: 0.5rem;
    margin-top: 0.05rem;
    align-self: center;
}

.matrix-table th[colspan="1"] {
    min-width: 110px !important;
    max-width: 200px;
    overflow: visible !important;
}

@media (max-width: 600px) {
    .matrix-header-title {
        min-width: 80px;
        width: 100%;
        display: flex !important;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
        height: 100%;
        overflow: visible;
    }
    .matrix-header-label {
        font-size: 0.95rem;
        font-weight: 400;
        margin-left: 0.25rem;
        margin-bottom: 0.15rem;
        white-space: normal;
        word-break: break-word;
        text-align: left;
    }
    .matrix-table th[colspan="1"] .matrix-header-label {
        font-weight: 300;
        margin-left: 0.5rem;
        margin-bottom: 0.3rem;
    }
    .matrix-header-flexrow {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: 90px;
        max-width: 140px;
        gap: 0.25rem;
        padding-right: 0.5rem;
        overflow: hidden;
    }
    .matrix-header-flexrow .mud-icon-button {
        margin-right: 0.5rem;
        margin-left: 0.5rem;
        margin-top: 0.05rem;
        align-self: center;
    }
    .matrix-header-flexrow .matrix-header-label {
        margin-right: 0.25rem;
        margin-bottom: 0;
        font-size: 0.95rem;
        font-weight: 400;
        white-space: normal;
        word-break: break-word;
        text-align: left;
    }
    .matrix-table th[colspan="1"] {
        min-width: 90px !important;
        max-width: 200px;
        overflow: visible !important;
    }
}