@import url('var.css');
@import url('dropdown.css');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body-color);
    font-family: 'Poppins', sans-serif;
    font-size: var(--txt-m-dimension);
    font-weight: 200;
    color: var(--txt-primary-color);
    position: relative;
}

a[target="_blank"]::after {
    /*content: "\f35d";*/
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font: var(--fa-font-solid);
    color: var(--txt-primary-color);
    opacity: 0.55;
    font-size: 0.625rem;
    content: '\f35d'; /* You should use \ and not /*/
    padding-left: .375rem;
    position: relative;
    bottom: .0625rem;
}

div.fast-nav {
    position: fixed;
    bottom: 1rem;
    right: .75rem;
    z-index: 5;
}

div.fast-nav button {
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background-color: var(--bg-primary-color);
    box-shadow: 0 .5rem 1rem var(--shadow-color);
    color: var(--txt-ligth-color);
    font-size: 1.5rem;
    /*line-height: 3rem;
    text-align: center;*/
    display: flex;
    justify-content: center;
    align-items: center;
}

main.strech {
    max-width: 50rem;

}

main.strech-xs {
    max-width: 30rem;

}

.container-box {
    margin-left: 3.5rem;
    max-width: calc(120rem - 4rem);
}


.header-box {
    width: 100%;
    position: fixed;
    z-index: 2;
    background-color: var(--bg-content-color);
    height: 3em;
    top: 0;
    /*left: 0;*/
    padding: 0 1rem;
}

/*.header-box.add-shadow-on-scroll {
    box-shadow: 0.5rem 0 1rem var(--shadow-color);
    transition: 1.2s;
}*/

header {
    transition: 0.2s;
}

/* Header and menu */
header > nav {
    max-width: 118rem; /* padding header-box 2x1rem */
    display: flex;
    justify-content: space-between;
}

header > nav > div:first-child {
    /*line-height: 3rem;*/
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Menu Hamburger */
header > nav button.hamburger {
    display: none;
    border: none;
    background-color: transparent;
}

/* End Menu Hamburger */

header > nav h1 {
    font-size: var(--txt-l-dimension);
    color: var(--txt-title-color);
    display: block;
    margin: 0;
}

header div.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

header div.search-box input[type=search] {
    border-radius: 0.25rem;
    border: 1px solid var(--bg-primary-color);
    width: 20rem;
    padding: 0.125rem 0.25rem;
    outline: none;
    font-weight: 200;
}
header div.search-box input[type=search]::placeholder {
    font-weight: 200;
    font-size: var(--txt-xs-dimension);
}

header div.search-box button {
    background-color: transparent;
    border: none;
    margin-left: 0.25rem;
}

header div.top-menu {
    display: flex;
    justify-content: space-between;
    /*gap: 1.5rem*/
}

header div.top-menu .search-box {
    margin-right: 1.5rem;
}

header div.top-menu .search-box label {
    font-weight: bold;
    margin-right: .5rem;
}
header div.top-menu .search-box label,
header div.top-menu .search-box input {
    font-size: var(--txt-s-dimension);
}

/* Header and menu */

/* Aside menu */
nav.aside {
    font-weight: 300;
    width: 3rem;
    /*width: 16.75rem;*/
    height: 100vh;
    padding: 0 0 0 0.5rem;
    position: fixed;
    z-index: 2;
    top: 3rem;
    background-color: var(--bg-content-color);
    transition: box-shadow .25s ease-in-out, width .25s ease-in-out;
    /* IE and Edge */
    -ms-overflow-style: none;
    /* Firefox */
    scrollbar-width: none;
    overflow-y: auto;
    padding-top: 1rem;
    padding-bottom: 4rem;
    /*p1 + t3 = 4*/
}

/* Hide scrollbar for Chrome, Safari and Opera */
nav.aside::-webkit-scrollbar {
    display: none;
}

nav.aside:hover {
    width: 16.75rem;
    box-shadow: 0 .5rem 1rem var(--shadow-color);
}

hr {
    border: 0;
    border-top: 1px solid var(--txt-secondary-color);
    width: calc(100% - .5rem);
}

nav.aside a:link,
nav.aside a:visited {
    display: flex;
    font-size: var(--txt-s-dimension);
    color: var(--txt-primary-color);
    text-decoration: none;
    width: 16.25rem;
    /* w16.75 - p0.5 - m0.5 = 15.75*/
    margin-bottom: .25rem;
    height: 2rem;
    line-height: 2rem;
    padding: 0 .5rem;
    /*margin-left: .5rem;*/
    position: relative;
    z-index: 20;

}

nav.aside a:hover,
nav.aside a:active,
nav.aside a.active {
    border-radius: .25rem 0 0 .25rem;
    background-color: var(--bg-primary-color);
    color: var(--txt-ligth-color);
}

/* aside dropdown */

nav.aside dropdown {
    margin: 0;
}

nav.aside .dropdown ul {
    display: none;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 8rem;
    overflow-y: auto;
    overflow-x: hidden;
    /*margin-left: 2.5rem;*/
}

nav.aside .dropdown ul a:link,
nav.aside .dropdown ul a:visited {
    margin-bottom: 0.25rem;
    /*width: 14.25rem;*/
    white-space: nowrap;
    /* Tot aside w15.75 - 2m */

}

nav.aside .dropdown ul.show {
    display: block;
}

nav.aside .dropdown ul > li {
    padding-left: 2.5rem;
}

/* End aside dropdown */

nav.aside span:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: .5rem;
    width: 1rem;
}

nav.aside span:last-child {
    display: none;
}

nav.aside:hover span:last-child {
    display: block;
}

/* End Aside menu */

/* End subject content */
.dashboard-content {
    display: grid;
    /* TODO aumentare la larghezza della seconda colonna
    grid-template-columns: minmax(5rem, 1fr) minmax(18fr, 18fr);*/

    /*grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));*/
    grid-template-columns: calc(40% - 2rem) calc(60% - .5rem);
    gap: 2.5rem;
    width: calc(100% - 4rem);
    /*max-width: calc(120rem - 4rem);*//* 120rem -> 1920px */
    /*margin-left: 3.5rem;*/
    padding: 0.75rem;
    margin-top: 3.25rem;
    font-size: var(--txt-m-dimension);
}

.dashboard-content > section > section
    /*.dashboard-content > section:last-child > section*/
{
    border-radius: .5rem;
    border: 1px solid var(--brd-primary-color);
    background-color: var(--bg-content-color);
    padding: .75rem;
    transition: box-shadow .25s ease-in-out;
    color: var(--txt-primary-color);
}

.dashboard-content > section > section:not(:last-child) {
    margin-bottom: 1rem;
}

.dashboard-content > section > section:hover
    /*.dashboard-content > section:last-child > section:hover*/
{
    box-shadow: 0 .5rem 1rem var(--shadow-color);
}

.dashboard-content section h2 {
    font-size: var(--txt-l-dimension);
    color: var(--txt-primary-color);
    margin-bottom: 1.25rem;
}

.dashboard-content section h2 > small {
    font-size: var(--txt-xs-dimension);
    font-weight: 300;
}

.dashboard-content section article:not(:last-child) {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--brd-primary-color);
}

.dashboard-content section h4 {
    font-size: var(--txt-m-dimension);
    font-weight: 500;
    margin-bottom: .75rem;
}

.dashboard-content section details {
    /*font-size: var(--txt-s-dimension);*/
    color: var(--txt-primary-color);
}

.dashboard-content section details p {
    margin-left: 1.375rem;
}

.dashboard-content section details[open] summary {
    font-weight: 500;
}

/* Dashboard news */
.dashboard-content section.news h2 > small a:link,
.dashboard-content section.news h2 > small a:visited,
.dashboard-content section.activities h2 > small a:link,
.dashboard-content section.activities h2 > small a:visited {
    color: var(--txt-secondary-color);
    text-decoration: none;
}

.dashboard-content section.news h2 > small a:hover,
.dashboard-content section.news h2 > small a:active,
.dashboard-content section.activities h2 > small a:hover,
.dashboard-content section.activities h2 > small a:active {
    text-decoration: underline;
}

.dashboard-content section.news h4 {
    margin: 0;
}

/*.dashboard-content section.news article {
    border: 0;
    font-size: var(--txt-s-dimension);
    transition:margin-left .2s ease-in-out;
}*/

.dashboard-content section.news > section:hover a,
.dashboard-content section.activities > section:hover a {
    opacity: 0.25;
}

.dashboard-content section.news > section a,
.dashboard-content section.activities > section a {
    padding: .25rem 0;
}

.dashboard-content section.news > section a:nth-child(odd),
.dashboard-content section.activities > section a:nth-child(odd) {
    background-color: var(--bg-body-color);
    border-radius: .25rem;
}

.dashboard-content section.news > section a:link,
.dashboard-content section.news > section a:visited,
.dashboard-content section.activities > section a:link,
.dashboard-content section.activities > section a:visited {
    display: block;
    border: 0;
    font-size: var(--txt-s-dimension);
    transition: all .15s ease-in-out;
    color: var(--txt-primary-color);
    text-decoration: none;
}

.dashboard-content section.news > section a:hover,
.dashboard-content section.news > section a:active,
.dashboard-content section.activities > section a:hover,
.dashboard-content section.activities > section a:active {
    /*margin-left: 0.75rem;*/
    opacity: 1;
}


.dashboard-content section.news article header,
.dashboard-content section.activities article header {
    font-size: var(--txt-s-dimension);
    padding-bottom: .25rem;
}

.dashboard-content section article span.test-news,
.dashboard-content section article span.assignment-news,
.dashboard-content section article span.labo-news {
    /*padding: 0.125rem 0.5rem;*/
    height: .75rem;
    width: .75rem;
    border-radius: 1rem;

}

.dashboard-content section article span.test-news {
    background-color: rgba(255, 0, 0, 0.7);
}

.dashboard-content section article span.assignment-news {
    background-color: rgba(0, 128, 0, 0.7);
}

.dashboard-content section article span.labo-news {
    background-color: rgba(0, 0, 255, 0.7);
}

/* activities */
.dashboard-content section.news article,
.dashboard-content section.activities article {
    display: grid;
    grid-template-columns: 3rem calc(100% - 3rem) /*repeat(2, 1fr)*/;
    grid-row: auto;
}

.dashboard-content section.news article .col-span,
.dashboard-content section.activities article .col-span {
    grid-row: span 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-content section.activities article header {
    display: flex;
    justify-content: space-between;
    padding-right: .5rem;
}

/* End Dashboard news */

/* End Dashboard content */

/* Subject content */
.subject-content-sort-box {
    width: calc(100% - 4rem);
    /*margin-left: 3.5rem;*/
    padding: 0.75rem 0.75rem 0 0.75rem;
    margin-top: 4rem;
    margin-bottom: 1rem;
    font-size: var(--txt-s-dimension);
    font-weight: 300;
    display: flex;
}

.subject-content-sort-box div {
    display: flex;
}

.subject-content-sort-box div:not(:last-child) {
    margin-right: 1.5rem;
}

.subject-content-sort-box button {
    border: none;
    padding: 0.25rem .5rem;
    font-weight: 300;
    background-color: var(--bg-content-color);
    font-size: var(--txt-xs-dimension);
    /*border: 1px solid var(--brd-primary-color);*/

}

.subject-content-sort-box button:hover,
.subject-content-sort-box button.active {
    background-color: var(--bg-primary-color);
    color: var(--txt-ligth-color);
}

.subject-content-sort-box button:first-child {
    border-radius: 0.25rem 0 0 0.25rem;
}

.subject-content-sort-box button:last-child {
    border-radius: 0 0.25rem 0.25rem 0;
}

.subject-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
    width: calc(100% - 4rem);
    /*margin-left: 3.5rem;*/
    padding: 0.75rem;
    /*margin-top: 3rem;*/
}

.subject-content article {
    border-radius: .5rem;
    border: 1px solid var(--brd-primary-color);
    background-color: var(--bg-content-color);
    padding: .75rem .75rem calc(.75rem - 0.125rem) .75rem; /* .125 rem margin bottom tiils button */
    transition: box-shadow .25s ease-in-out;
    min-height: 6rem;
}

.subject-content article.hidden {
    display: none;
}

.subject-content article:hover {
    box-shadow: 0 .5rem 1rem var(--shadow-color);
}

.subject-content article header {
    height: 6rem;
    border-bottom: 1px solid var(--brd-secondary-color);
    margin-bottom: .5rem;
    position: relative;
    z-index: 1;
}

.subject-content article header > div {
    display: flex;
    justify-content: space-between;
}

.subject-content article h3 {
    color: var(--txt-primary-color);
    font-size: var(--txt-m-dimension);
    font-weight: 600;
}


.dashboard-content > section > h3 {
    margin-bottom: 1.5rem;
}

.subject-content article h4 {
    color: var(--txt-secondary-color);
    font-size: var(--txt-s-dimension);
}

.subject-content article h3 + span {
    font-size: var(--txt-xs-dimension);
    position: absolute;
    bottom: 0;
    left: 0;
    margin-bottom: 0.5rem;
}

.subject-content article section > a:link,
.subject-content article section > a:visited {
    font-size: var(--txt-s-dimension);
    font-weight: 300;
    display: inline-block;
    margin-bottom: .125rem;
    background-color: var(--bg-body-color);
    padding: .25rem .5rem;
    color: var(--txt-primary-color);
    text-decoration: none;
    border-radius: .25rem;
}

.subject-content article section > a:hover,
.subject-content article section > a:active {
    background-color: var(--bg-primary-color);
    color: var(--txt-ligth-color);
}

table.table a {
    color: var(--txt-primary-color);
}

/*table.table tbody tr{
    position: relative;
    z-index: 1;
}

.btn-outline-table {

    color: var(--bg-primary-color);
}

.btn-outline-table:hover {
    background-color: var(--bg-primary-color);
    color: var(--txt-ligth-color);
}*/
#searchModal .modal-body {
    height: 500px;
}

#searchModal form {
    position: relative;
}

#searchModal form i {
    position: absolute;
    top:.6rem;
    left: .5rem;
}


#searchModal input[type=search] {
    width: 100%;
    padding: 0.25rem .25rem .25rem 2rem;
    border: 1px solid var(--brd-secondary-color);
    border-radius: .25rem;
    font-weight: 300;
}

#searchModal input[type=search]:focus {
    outline: 1px solid #6ea8fe;
    box-shadow: 0 0 5px #6ea8fe;
}

.table-row-drag {
    opacity: 0;
}

table tbody tr {
    z-index: 1;
}

/*table tbody tr:hover {
    cursor: grab;
    /*cursor: move;
    cursor: -webkit-grabbing;*/
/*}*/

.table-row-chosen {
    box-shadow: 8px 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 50;
    cursor: grabbing;
}

.command-key small {
    font-weight: normal;
    margin-left: .125rem;
    padding: 0 .125rem;
    border-radius: .25rem;
    border:1px solid black;
}

.advanced-search {
    margin-bottom: 2rem;
}

.advanced-search input[type=checkbox] {
    display: none;
}

.advanced-search input[type=checkbox] + label {
    background-color: transparent;
    border: 1px solid var(--bg-primary-color);
    color: var(--txt-primary-color);
    padding: 0.25rem .5rem;
    border-radius: 5rem;
    font-size: var(--txt-s-dimension);
}

.advanced-search input[type=checkbox] + label:hover {
    cursor: pointer;
}

.advanced-search input[type=checkbox]:checked + label {
    background-color: var(--bg-primary-color);
    color: var(--txt-ligth-color);


}

.result {
    margin-top: 2rem;
}

.result h6 {
    margin-top: 1rem;
}

.result span {
    background-color: var(--txt-highlight-color);
    padding: .125rem;
}

.result .result-document,
.result .result-notice{
    margin: 1rem 0 0.25rem 0;
    border-bottom: 1px solid var(--brd-primary-color);
}

.result .result-document>div:nth-child(odd),
.result .result-notice>div:nth-child(odd){
    background-color: var(--bg-body-color);
}

.result .result-document>div,
.result .result-notice>div{
    padding: .25rem;
}


/* End Subject content */
@media screen and (min-width: 48rem) and (max-width: 62rem) {
    .dashboard-content {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media screen and (max-width: 48rem) {

    .dashboard-content {
        grid-template-columns: 1fr;
    }

    div.fast-nav {
        bottom: 1rem;
        transition: .25s ease-in-out;
    }

    nav.aside {
        left: -3rem;
        transition: .2s;
    }

    .container-box {
        width: 100%;
        margin: 3rem 0;
    }

    header > nav button.hamburger {
        display: block;
    }

    /*header > nav button.hamburger + h1 {
        display: block;
        margin: 0;
    }*/
    /* Class css library hamburger */
    .hamburger {
        padding: 0;
        margin-right: 0.5rem;
    }

    .hamburger-box {
        width: 1.75rem;
        height: 1.125rem;
    }

    .hamburger-inner,
    .hamburger-inner:after,
    .hamburger-inner:before {
        width: 1.5rem;
        height: .125rem;
        margin: 0;
    }


    .hamburger-inner:before {
        top: .5rem;
    }

    .hamburger-inner:after {
        bottom: .5rem;
    }

    /* End Class css library hamburger */
    nav.aside.open {
        width: 100%;
        left: 0;
        z-index: 20;
    }

    nav.aside span:last-child {
        display: block;
    }

    nav.aside a:link, nav.aside a:visited {
        width: 100%;
    }

    .subject-content-sort-box {
        background-color: var(--bg-body-color);
        margin: 0;
        padding: .5rem;
        position: fixed;
        bottom: 1.25rem;
        left: .75rem;
        width: calc(100% - 5rem);
        z-index: 10;
        box-shadow: 0 .5rem 1rem var(--shadow-color);
        transition: bottom .2s ease-in-out;
        border-radius: .5rem;
    }

    .subject-content-sort-box div:last-child::-webkit-scrollbar {
        opacity: 0;
        width: 0;
        display: none;
        background-color: transparent;
    }

    .subject-content-sort-box div:last-child {
        width: 100%;
        overflow-x: scroll;
        overflow-y: hidden;
        white-space: nowrap;
        scroll-snap-type: x mandatory;
    }

    div.dropdown > button {
        padding: 0 .5rem;
    }

}
