@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800;900;1000&family=Roboto:wght@300;400;500;700&display=swap");

*,
*::before,
*::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    /* border: 1px solid red; */
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("../assets/img/bg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    --body-padding: 0.5rem;
    padding: var(--body-padding);
}

/* MAIN MENU */

main {
    width: calc(100svw - 2*var(--body-padding));
    max-width: calc(100svw - 2*var(--body-padding));
    height: calc(100svh - 2*var(--body-padding));
    max-height: calc(100svh - 2*var(--body-padding));
    background: rgb(254, 254, 254);
    box-shadow: 0 0.5px 0 1px rgba(255, 255, 255, 0.23) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.66) inset, 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 15px;
    z-index: 1;

    display: flex;
    flex-direction: row;
}

/* --------------------------------------------------------------------------------------------------------------------- */
/* ----------------------------------------     NAVIGATION      -------------------------------------------------------- */
/* --------------------------------------------------------------------------------------------------------------------- */

nav {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
}

.nav-menu {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background: rgb(var(--secondary-color));
    border-radius: 15px 0 0 15px;

    flex: 1;
}

.nav-menu h1 {
    display: block;
    font-size: larger;
    font-weight: 500;
    text-align: center;
    margin: 20px 0 30px;
    color: rgb(var(--text-color));
}

.nav-item {
    position: relative;
    display: block;
}

.nav-item:hover {
    cursor: pointer;
}

.nav-item a {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: rgb(var(--text-color));
    font-size: xx-large;
    padding: 15px;
    margin-left: 10px;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

.nav-item b:nth-child(1) {
    position: absolute;
    top: -15px;
    height: 15px;
    width: 100%;
    background: rgb(var(--text-color));
    opacity: 0;
}

.nav-item b:nth-child(1)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-bottom-right-radius: 20px;
    background: rgb(var(--secondary-color));
}

.nav-item b:nth-child(2) {
    position: absolute;
    bottom: -15px;
    height: 15px;
    width: 100%;
    background: rgb(var(--text-color));
    opacity: 0;
}

.nav-item b:nth-child(2)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-top-right-radius: 20px;
    background: rgb(var(--secondary-color));
}

.nav-item.active b:nth-child(1),
.nav-item.active b:nth-child(2) {
    opacity: 1;
}

.nav-item.active a {
    text-decoration: none;
    color: rgb(var(--secondary-color));
    background: rgb(var(--text-color));
}

.nav-icon {
    font-size: larger;
    text-align: center;
    padding: 0 0.5rem;
}

.nav-text {
    font-size: large;
    font-weight: 700;
}


/* --------------------------------------------------------------------------------------------------------------------- */
/* -----------------------------------------      CONTENT      --------------------------------------------------------- */
/* --------------------------------------------------------------------------------------------------------------------- */

a {
    text-decoration: none;
}

.content {
    flex: 6;

    height: inherit;
    max-height: inherit;

    display: flex;
    flex-direction: column;

    overflow-x: scroll;
}

#download {
    padding: 2rem;

    box-shadow: rgba(var(--background-color)) 5px 1px 10px;
}

table {
    border-spacing: 1;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    position: relative;

    box-shadow: rgba(var(--background-color)) 0 0 2px;
}

table * {
    position: relative;
}

table th {
    font-size: larger;
    font-weight: 500;

    color: rgb(var(--text-color))
}

table thead tr {
    height: 3rem;
    background: rgb(var(--primary-color));
}

table tbody tr {
    height: 4rem;
}

table tbody tr:last-child {
    border: 0;
}

table td,
table th {
    text-align: left;
    padding-left: 8px;
}

table td.l,
table th.l {
    text-align: right;
}

table td.c,
table th.c {
    text-align: center;
}

table td.r,
table th.r {
    text-align: center;
}

tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

tbody tr {
    font-family: OpenSans-Regular;
    font-size: 15px;
    color: #808080;
    line-height: 1.2;
    font-weight: unset;
}

tbody tr:hover {
    color: rgb(var(--text-color));
    background-color: rgba(var(--background-color), 0.8);
}

#paper {
    height: calc(100svh - 2*var(--body-padding) - 1rem);
    max-height: calc(100svh - 2*var(--body-padding) - 1rem);
    width: 100%;
    padding: 2rem;
}

.paper__document {
    width: inherit;
    height: inherit;
}


@media (max-width: 1000px) {
    main {
        flex-direction: column;
        font-size: large;
    }

    .nav-menu {
        h1 {
            display: none;
        }

        ul {
            display: flex;
            flex-direction: row;
            justify-content: space-around;
            align-items: center;
            gap: 1rem;

            padding: 2rem;
        }

        b {
            visibility: hidden;
        }

        .nav-item a {
            border-radius: 15px;
            margin-left: 6px;
        }


        border-radius: 0;

        flex: 1;
        display: flex;
    }

    .content {
        flex: 10;
    }
}

/* --------------------------------------------------------------------------------------------------------------------- */
/* -----------------------------------------      SNACKBAR      -------------------------------------------------------- */
/* --------------------------------------------------------------------------------------------------------------------- */

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    visibility: hidden;
    /* Hidden by default. Visible on click */
    min-width: 250px;
    /* Set a default minimum width */
    margin-left: -125px;
    /* Divide value of min-width by 2 */
    background-color: #333;
    /* Black background color */
    color: rgb(var(--text-color));
    /* White text color */
    text-align: center;
    /* Centered text */
    border-radius: 2px;
    /* Rounded borders */
    padding: 16px;
    /* Padding */
    position: fixed;
    /* Sit on top of the screen */
    z-index: 10;
    /* Add a z-index if needed */
    left: 50%;
    /* Center the snackbar */
    bottom: 30px;
    /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
    visibility: visible;
    /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
        However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}