@import url(variables.css);

/* General */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: GothamBold;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 1.25rem;
    margin: 0;
}

h2 {
    font-size: 1.125rem;
    margin: 1rem 0;
}

h3, h4, h5, h6 {
    font-size: 1rem;
    margin: 1rem 0 0.75rem 0;
}

b, strong, label {
    font-family: GothamMedium;
}

i {
    font-family: GothamLightItalic;
}

a {
    color: var(--nyu-violet);
    text-decoration: none;
}

:root {
    font-family: GothamLight;
    font-size: 1rem;
}

p, span, table, label {
    font-size: 0.9375rem;
}

span.avoidwrap { 
    display:inline-block;
}

/* Page Template */
html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    margin: 0;
}

main {
    margin: var(--widthMargin);

    h2 {
        margin: 0;
    }
}

/* Layouts */
.layout-50-50 {
    display: flex;
    flex-direction: column;

    @media (min-width: 992px) {
        flex-direction: row;
    }

    > div {
        max-width: 100%;
        width: 100%;

        @media (min-width: 992px) {
            max-width: calc(50% - 1rem);
            width: calc(50% - 1rem);

            &:first-child {
                margin-right: auto;
            }
            &:last-child {
                margin-left: auto;
            }
        }
    }
}

.layout-25-75 {
    display: flex;
    flex-direction: column;

    @media (min-width: 768px) {
        flex-direction: row;
    }

    > div {
        max-width: 100%;
        width: 100%;
    }

    > div:first-child {
        @media (min-width: 768px) {
            max-width: calc(25% - 1rem);
            width: calc(25% - 1rem);
        }
    }

    > div:last-child {
        margin-top: 1rem;

        @media (min-width: 768px) {
            max-width: calc(75% - 1rem);
            width: calc(75% - 1rem);
            margin-left: auto;
            margin-top: 0;
        }
    }
}

/* Multiple Divs with Two Items in a Row/Column */
.two-item-multiwrapper {
    margin: 0.925rem 0;

    @media (min-width: 600px) {
        margin: 0.5rem 0 0.925rem 0;
    }
}

/* Two items in a row */
.two-item-row {
    display: flex;
    flex-direction: column;

    @media (min-width: 600px) {
        flex-direction: row;
    }
    
    > * {
        @media (min-width: 600px) {
            margin: 0.75rem 0;
            max-width: 350px;
            width: 350px;
        }

        &:first-child {
            font-family: GothamMedium;
        }
        &:last-child {
            width: 200px;
            padding: 0.1rem;

            @media (max-width: 600px) {
                margin: 0.125rem 0 0.825rem 0;
            }
        }
    }

    > span:last-child {
        border: 1px solid transparent;
    }
}

.two-item-column {
    display: flex;
    flex-direction: column;

    & + .two-item-column {
        margin-top: 0.5rem;
    }
}

/* Form Elements */
.radio-options-wrapper {
    display: flex;
    flex-direction: row;

    > div {
        width: fit-content;
        margin-right: 0.5rem;
        text-wrap: nowrap;
    }

    label {
        font-size: 0.875rem;
        font-family: GothamBook;
    }

    &.column-options {
        flex-direction: column;
    }
}

input, select, textarea {
    border: 1px solid var(--medium-gray-3);
    border-radius: 4px;
    padding: 0.2rem 0.35rem;
    font-family: GothamLight;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--white);
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: 100%;
    padding-right: 1.5rem;
    text-align: center;
  }

.form-wrapper {
    border: 1px solid;
    padding: 1rem;

    label {
        margin-bottom: 0.1rem;
    }
}

#lockerSearch, #studentSearch {
    margin-top: 1rem;

    .form-wrapper {
        display: flex;
        flex-direction: column;

        @media (min-width: 576px) {
            flex-direction: row;
            flex-wrap: wrap;
        }

        @media (min-width: 768px) {
            flex-direction: column;
        }
    }

    .two-item-column {
        width: 100%;

        @media (min-width: 576px) {
            width: calc(50% - 0.5rem);
            

            &:nth-child(even){
                margin-left: auto;
            }

            &:nth-child(2) {
                margin-top: 0;
            }
        }

        @media (min-width: 768px) {
            width: 100%;
        }
    }

    textarea {
        max-width: calc(100% - 0.7rem);
        min-width: calc(100% - 0.7rem);
    }
}

#search {
    h3 {
        width: 100%;
        border-bottom: 1px solid var(--black);
        margin-top: 0;
        padding-bottom: 0.5rem;
    }
}

/* Grey Overlay for Modals and Mobile Menu */
#menu-overlay, .grey-overlay {
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: var(--dark-gray);
    opacity: 0.5;
    top: 0;
    left: 0;
}

/* Modals */
.modal {
    display: none;
    z-index: 2;
    position: absolute;
    background-color: var(--white);
    padding: var(--widthMargin);
    top: 50%;
    width: calc(100% - 100px);
    height: fit-content;

    @media (min-width: 768px) {
        width: 400px;
        left: 50%;
        margin: -150px -200px;
    }

    &.modal-active {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .modal-header {
        display: flex;
    }

    .modal-close {
        position: absolute;
        top: var(--widthMargin);
        right: var(--widthMargin);

        button {
            border: none;
            background: none;
            position: relative;
            height: 1.5rem;
            width: 1.5rem;
            padding: 0;

            img {
                width: 1.5rem;
                height: 1.5rem;
            }
        }
    }

    .modal-header h3 {
        margin-top: 0;
    }

    .modal-content {
        margin: 0 25px 25px 0;
    }

    .button-container {
        display: flex;
        margin-left: auto;
        flex-wrap: wrap;
    }
}

/* Warning message used in modal */
.warning {
    font-family: GothamMedium;
    font-size: 0.875rem;
}

/* Header */
header {
    .banner-top {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        height: 80px;
        max-height: 80px;
    }

    .banner-logo {
        margin: auto var(--widthMargin);

        a {
            display: flex;
        }

        img {
            height: 40px;
        }
    }

    #header-banner-bottom {
        height: 3rem;
        background-color: var(--nyu-violet);
        display: flex;

        h1 {
            margin: auto var(--widthMargin);
            color: var(--white);
        }
    }
}

/* Default Icon Sizing */
.icon {
    height: 1rem;
    width: auto;
    margin-right: 0.5rem;
}

/* Mobile Menu Button */
button#menu-button {
    border: none;
    background: none;
    display: block;
    margin: auto var(--widthMargin);
    z-index: 1;
    height: fit-content;

    @media (min-width: 768px) {
        display: none;
    }

    img {
        height: 2rem;
        width: 2.5rem;
    }
}

/* Main Nav in Header */
nav {
    a {
        font-size: 0.85rem;
        text-decoration: none;
        font-family: GothamBold;
        color: var(--black);
        margin: auto 1rem;

        img {
            height: 1rem;
            margin: auto 0.5rem auto 0; 
        }
    }
}

/* Mobile Navigation */
#mobile-nav {
    display: flex;

    @media (min-width: 768px) {
        display: none;
        margin-right: 0;
    }

    nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        width: 0;
        overflow: hidden;
        right: 0;
        top: 0;
        border: none;
        background-color: var(--white);
        transition: all 0.25s ease-in;
        height: calc(100% - 80px);
        padding-top: 80px;
        z-index: 1;
    
        &.active {
            right: 0;
            top: 0;
            width: 200px;
            transition: all 0.25s ease-out;
            border: 1px solid var(--medium-gray-4);
            border-right: 0;
            border-top: 0;
    
            @media (min-width: 768px) {
                display: none;
            }
        }

        a {
            height: fit-content;
            padding: 0.9rem;
            width: calc(100% - 2rem);
            margin: 0;
            display: flex;
            justify-content: center;;
            border-top: 1px solid var(--medium-gray-4);
            
            &:hover {
                background-color: var(--medium-gray-3);
            }

            &:last-of-type {
                border-bottom: 1px solid var(--medium-gray-4);
            }
        }
    }
    button#menu-button {
        background: none;
        border: none;
        padding: 0;
        z-index: 2;

        img {
            height: 2rem;
            width: 2.5rem;
        }
    }
}

/* Desktop Navigation */
#desktop-nav {
    display: none;
    @media (min-width: 768px) {
        display: flex;
    }

    nav {
        display: none;
    
        @media (min-width: 768px) {
            display: flex;
            flex-direction: row;
        }
    }
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--medium-gray-3);

    #footer-note {
        text-align: center;
        margin: 0.5rem var(--widthMargin);
        font-size: 0.75rem;
        color: var(--dark-gray);
    }
}

/* Button Styles */
button {
    font-family: GothamMedium;
    cursor: pointer;
}

.button-primary, .button-secondary {
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    margin: 0 0.5rem 0.125rem 0rem;
}

.button-primary {
    color: var(--white);
    background-color: var(--nyu-violet);
    border: 2px solid var(--nyu-violet);
    
    &:hover {
        color: var(--nyu-violet);
        background-color: var(--white);
    }
}
.button-secondary {
    color: var(--nyu-violet);
    background-color: var(--white);
    border: 2px solid var(--nyu-violet);
    
    &:hover {
        color: var(--white);
        background-color: var(--nyu-violet);
    }
}

button.drop-down {
    border: none;
    background: none;
    display: flex;

    &.active img {
        transform: rotate(90deg);
    }
}

/* Dropdown */
.drop-down-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;

    &.active {
        max-height: 500px;
        transition: max-height 0.25s ease-in;
    }
}

.drop-down-inner-content {
    margin-top: 0.875rem;
    font-size: 0.875rem;
}

/* Stylized lists */
ol.step-list {
    margin-left: 0.825rem;

    li::marker {
        content: 'Step ' counter(list-item) ': ';
        display: inline-block;
        font-family: GothamBook;
    }
}

/* Tables */
table {
    width: 100%;
    border-spacing: 1px;
    border-collapse: collapse;

    tr {
        border: 1px solid var(--medium-gray-3);
        &.header{
            background-color: var(--medium-gray-4);
        }

        &.column-header {
            th {
                font-family: GothamBook;
            }

            &.total {
                background-color: var(--light-gray);

                th {
                    font-family: GothamMedium;
                }
            } 
        }
    }
    th {
        font-family: GothamMedium;
    }
    th, td {
        text-align: left;
        padding: 0.5rem 1rem;
        text-wrap: pretty;
    }

    td {
        vertical-align: top;
    }
}

#studentSearchResults {
    .header {
        font-size: 0.875rem;
    }
}

#settings, #changeSettings, #locker-search-results, #student-search-results, #studentSearch, #lockerSearch {
    display: none;

    &.active {
        display: block;
    }
}

.errortext {
    color: var(--red);
    font-family: GothamMedium;
}