/* stile degli elementi globali */

:root {
    color-scheme: light dark;
}

html {
    color: light-dark(black, white);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

h1,
h2 {
    color: light-dark(blue, deepskyblue);
}

/* stile degli elementi semantici */

main {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

aside {
    flex: 1;
    padding: 30px 40px 40px 60px;
    background-color: light-dark(white, black);
}

/* .intestazione {
    font-size: 1em;
    text-align: center;
    padding: 0.5em;
    flex-direction: row;
    justify-content: space-between;
} */

nav {
    position: fixed;
    left: 0;
    top: 1em;
    /* transform: translateY(-50%); */
    display: flex;
    flex-direction: column;
    gap: 1em;
    z-index: 1000;
}

header {
    position: fixed;
    right: 5px;
    top: 5px;
}

button {
    cursor: pointer;
    padding: 10px;
}

/* stile del contenuto della sidebar */

.tab {
    /* width: 1em; */
    /* background-color: #4CAF50; */
    background-color: blue;
    color: white;
    padding: 12px 16px 12px 8px;
    cursor: pointer;
    border-radius: 8px 0 0 8px;
    /* box-shadow: -2px 2px #AAAAAA; */

    writing-mode: vertical-rl;
    transform: rotate(180deg) translateX(10px);

    /* font-size: 1em; */
    font-weight: bold;
    /* letter-spacing: 1px; */
    text-align: center;

    transition: transform 0.25s ease, background-color 0.25s ease;
}

/* .tab:nth-of-type(1) {
    background-color: red;
}

.tab:nth-of-type(2) {
    background-color: green;
}

.tab:nth-of-type(3) {
    background-color: blue;
}

.tab:nth-of-type(4) {
    background-color: darkorange;
}

.tab:nth-of-type(5) {
    background-color: violet;
} */

.tab:hover {
    filter: brightness(85%);
    transform: rotate(180deg) translateX(0px);
}

.tab.attivo {
    filter: brightness(85%);
    transform: rotate(180deg) translateX(0px);
}


.sezione {
    display: none;
}

.sezione.attivo {
    display: block;
}


/* stile generico delle tabelle */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    border: 2px solid light-dark(grey, lightgrey);
    padding: 10px;
}

/* stile specifico della tabella matrice */

.matrice {
    max-width: calc(1920px/3);
    text-align: center;
}

.matrice td {
    color: light-dark(black, white);
    font-weight: bold;
}

.matrice td:first-of-type {
    text-align: left;
}

/* .matrice th:nth-of-type(1), .matrice th:nth-of-type(2) {
    border: 0px;
} */

.matrice .vuoto {
    border: 0px;
}

.matrice .prob, .matrice .grav {
    cursor: pointer;
}

.matrice .r0 {
    background-color: green;
    color: black;
}

.matrice .r1 {
    background-color: yellow;
    color: black;
}

.matrice .r2 {
    background-color: red;
    color: black;
}

.matrice .r3 {
    background-color: black;
    color: white;
}

.matrice .selezionato {
    outline: 4px solid orange;
}

/* stile specifico della tabella gruppi */

.gruppi {
    max-width: calc(1920px/4);
}

.gruppi td:first-of-type {
    text-align: center;
}

.gruppi th {
    background-color: light-dark(lightgrey, grey);
}

/* stile della sezione PDF e del QR code */

.download a {
    display: inline-block;
    margin-top: 20px;
    background-color: light-dark(blue, deepskyblue);
    color: white;
    padding: 12px 18px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

#pdf {
    justify-items: center;
}


#qrcode {
    padding: 20px;
}

/* TODO: RESPONSIVE */
@media (max-width: 768px) {
    /* .container {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                display: flex;
                overflow-x: auto;
            }

            .tab {
                flex: 1;
                text-align: center;
                border-left: none;
                border-bottom: 4px solid transparent;
            }

            .tab.active {
                border-bottom: 4px solid #ffd700;
            } */
}