.hidden {
    display: none;
    opacity: 0;
}

.gone {
    display: none;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

header {
    z-index: 100;

    div.burger {
        text-align: center;

        h6 {
            margin: 0;
            padding-top: 1rem;
        }
    }

    div.logo {
        img {
            margin: 12px;
            height: calc(100% - 24px);
            width: calc(100% - 24px);
            border-radius: 10%;
        }
    }

    div.title {
        h2 {
            margin: 0;
            font-weight: var(--typography-fontWeightRegular);
            font-size: 1.6rem;
            transition: var(--transition-style);
        }
    }

    @media screen and (max-width: 768px) {
        div.title h2 {
            font-weight: var(--typography-fontWeightMedium);
            font-size: 1.5rem;
        }
    }

    div.profile-menu {
        .profile {
            position: relative;
            width: 50px;
            height: 50px;
            margin: 7px 12px 7px 0;
            border-radius: 50%;
            overflow: hidden;
            cursor: pointer;

            img {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }

        .menu {
            position: absolute;
            top: 80px;
            right: 10px;
            padding: 10px 20px;
            width: 200px;
            border-radius: 15px;
            transition: var(--transition-style);
            visibility: hidden;
            opacity: 0;

            h3 {
                width: 100%;
                text-align: center;
                font-size: 18px;
                padding: 20px 0;
                font-weight: var(--typography-fontWeightMedium);
                line-height: 1.5em;

                span {
                    font-size: 14px;
                    font-weight: var(--typography-fontWeightLight);;
                }
            }

            ul {
                padding-inline-start: 0;

                li {
                    list-style: none;
                    margin: 0;
                    padding: 16px;
                    border-top: 1px solid rgba(0, 0, 0, 0.05);
                    display: flex;
                    align-items: center;

                    a {
                        display: inline-block;
                        text-decoration: none;
                        font-weight: var(--typography-fontWeightMedium);
                    }
                }
            }
        }

        .menu.active {
            top: 80px;
            visibility: visible;
            opacity: 1;
        }

        .menu::before {
            content: "";
            position: absolute;
            top: -5px;
            right: 18px;
            width: 20px;
            height: 20px;
            transition: var(--transition-style);
            transform: rotate(45deg);
        }
    }
}

nav.main-nav {
    overflow-x: hidden;

    h2 {
        font-weight: var(--typography-fontWeightBold);
        font-size: 1.2rem;
        line-height: 1rem;
        margin-top: 0;
        margin-bottom: 0.5rem;
        padding-top: 0.6rem;
    }

    a,
    a:visited {
        font-size: 1.1rem;
        font-weight: var(--typography-fontWeightRegular);
        cursor: pointer;
        width: var(--sidebar-width);
        display: inline-block;
    }

    menu {
        list-style: none;
        padding: 0;

        li {
            padding: 0.175rem 20px;

            i {
                width: 1.3rem;
                text-align: center;
                padding-right: 0.5rem;
            }
        }

        li:has(> h2) {
            margin-top: 1rem;
        }
    }
}

main {
    padding-left: 4%;
    padding-right: 4%;

    table {
        border-spacing: 0;
        border-style: solid;
        border-width: 1px;
        border-radius: 8px;

        thead td,
        thead th {
            font-weight: var(--typography-fontWeightMedium);
            text-align: center;
        }

        td, th {
            margin: 0;
            padding: 0.4rem;
        }

        thead th {
            border-bottom-style: solid;
            border-bottom-width: 2px;
        }
    }

    aside.ensembleHomeQuickLinks {
        border-spacing: 0;
        border-style: solid;
        border-width: 1px;
        border-radius: 8px;
        padding: 0 1rem 1rem 1rem;

        a.button {
            width: 100%;
        }
    }
}

footer {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;

    nav,
    div {
        padding: 0.2rem;
        margin: 0 auto;
    }

    nav {
        menu {
            list-style-type: none;
            justify-content: center;
            margin-block-start: 0;
            margin-block-end: 0;
            padding-inline-start: 0;
            overflow: hidden;

            & > li {
                float: left;
                margin: 0 0.5rem;
            }
        }
    }

    section {
        margin: 0.5rem auto;
    }
}


/* ********************* SPINNER ********************* */
.spinner {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 10rem;
    border-style: solid;
    border-width: 0.25pt;
    animation: spin 1s linear infinite;
}

.spinner::before {
    position: absolute;
    content: "";
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border-radius: 10rem;
    border-style: solid;
    border-width: 0.25pt;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ***************** END SPINNER ********************* */

section#alert {
    height: initial;
    overflow: hidden;
    padding: 0;

    section {
        height: 0;
        max-height: 0;
        margin: 0;
        padding: 0;
        animation: alertFadeOut 10s forwards;
    }
}

@keyframes alertFadeOut {
    0% {
        opacity: 0;
        max-height: 0;
        height: 0;
    }
    1.5% {
        opacity: 1;
        height: 100%;
        max-height: initial;
        margin: 1rem;
        padding: 1rem;
    }
    96% {
        opacity: 1;
        height: 100%;
        max-height: initial;
        margin: 1rem;
        padding: 1rem;
    }
    100% {
        opacity: 0;
        height: 0;
        max-height: 0;
        margin: 0;
        padding: 0;
        display: none;
    }
}

section.alert {
    border-radius: 6px;
    padding: 1.3rem;
    margin: 1rem;

    .heading {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        font-weight: var(--typography-fontWeightBold);
        font-size: 1.2rem;
        padding-bottom: 1rem;

        span {
            display: flex;
            flex-direction: row;
            align-items: center;

            .icon {
                font-size: 1.5rem;
            }

            .title {
                padding-left: 0.75rem;
            }
        }

        a {
            font-size: 1.5rem;
            margin-top: -0.5rem;
        }
    }

    .message {
        height: auto;
    }
}


.render-attributes {
    display: flex;
    flex-direction: column;

    label {
        display: block;
        margin: 0.75em 0 0 0;

        .name {
            padding-right: 0.2em;
        }

        .value {
            font-weight: var(--typography-fontWeightBold);
        }
    }
}

.avatar-edit-ui {
    a {
        display: block;
        width: 100%;
        text-align: center;
    }
}

.avatar-samples {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    margin: 1rem 0;
    width: 100%;

    img {
        display: block;
        padding: 0.75rem;
        border-style: solid;
        border-width: 1px;
    }
}

.avatar-square {
    border-radius: 10%;
    overflow: hidden;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.avatar-round {
    border-radius: 50%;
    overflow: hidden;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.report-avatar {
    img {
        width: 20px;
        height: 20px;
    }
}

form.switch-profile-form {
    display: block;
}

.attributeSelectionContainer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    width: 100%;

    .leftSide,
    .rightSide {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;

        select {
            min-width: 15rem;
            min-height: 10rem;

            option {
                padding: 0.5rem;
            }
        }
    }

    .upDownButtons {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0.5rem;

        span {
            display: block;
            margin: 0.5rem;
        }
    }
}

.profileIdLoginHandle {
    display: grid;
    grid-template-columns: 1fr 3fr 5fr;
    gap: 2rem;
    width: 100%;

    label {
        margin: 1rem 0;
    }
}

.profileNameFirstLast {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 2rem;
    width: 100%;

    label {
        margin: 1rem 0;
    }
}

@media screen and (max-width: 768px) {
    .profileIdLoginHandle,
    .profileNameFirstLast {
        display: block;
        margin: 0;

        label {
            margin: 1rem;
        }
    }
}

.emailWithTestButton {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 2rem;
    width: 100%;

    label {
        margin: 1rem 0;
    }

    div {
        width: 100%;
        padding-top: 11px;
        align-self: center;

        button {
            align-self: center;
        }
    }
}

@media screen and (max-width: 768px) {
    .emailWithTestButton {
        display: block;
        margin: 0;

        label {
            margin: 1rem;
        }

        div {
            padding-top: 0;
        }
    }
}


.tooltip {
    position: relative;
    display: inline-block;

    .tooltiptext {
        visibility: hidden;
        width: 140px;
        background-color: #555;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 5px;
        position: absolute;
        z-index: 1;
        bottom: 150%;
        left: 50%;
        margin-left: -75px;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .tooltiptext::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #555 transparent transparent transparent;
    }

    &:hover .tooltiptext {
        visibility: visible;
        opacity: 1;
    }
}

.copyIcon {
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-bottom: -4px;
}

.rte-toolbar {
    margin-top: 0.6rem;
    background-color: var(--action-background-disabled);
    padding: 0.4rem;
    border-radius: 10px;

    .rte-toolbar-row {
        padding-bottom: 0.2rem;
    }

    .on {
        color: var(--action-text);
        font-weight: var(--typography-fontWeightMedium);
    }

    .off {
        color: var(--action-text-disabled);
    }

    .space {
        padding: 0 0.2rem;
    }

    .sep {
        padding: 0 1rem;
    }
}

button.full,
.button.full {
    width: 100%;
}

.rosterDisplay {
    h5 {
        margin-top: 0;
        margin-bottom: 0.5rem;
        font-size: 1.3rem;
        font-weight: var(--typography-fontWeightMedium)
    }

    .instrumentMembers {
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }

    .profileCard {
        img {
            width: 100px;
            height: 100px;
            margin-right: 8px;
            border-radius: 10px;
        }
    }
}

.roster-pending,
.rosterDisplay .pending {
    color: var(--action-text-disabled);
}

.attendanceTable {
    margin-top: 1rem;
}

.attendance-expected-yes,
.attendance-expected-maybe,
.attendance-expected-no {
    blockquote {
        padding: 0 2rem;
    }

    button {
        line-height: 1;
        box-shadow: none;
        border: none;
    }
}

.attendance-track-buttons button {
    width: 5.5rem;
}

.attendance-grid-event-name {
    transform: rotate(-90deg);
    width: 180px;
    height: 30px;
    margin-left: -70px;
}

td:has(.attendance-grid-event-name) {
    height: 15rem;
    max-width: 30px;
}

td.attendance-grid-member-name {
    min-width: 170px;
}

td.attendance-grid-instrument {
    font-weight: var(--typography-fontWeightBlack);
    font-size: 1.2rem;
}

table.dues-admin td {
    td {
        padding: 0.5rem;
    }
}

section.dues-summary,
section.dues-form {
    h3 {
        font-size: 1.3rem;
        text-align: left;
        margin: 0.5rem 0 0.5rem 0;
    }

    section.dues-payment {
        margin: 1rem;
        padding: 1rem;
        background-color: var(--background-secondary);
        color: var(--text-secondary);
    }

}

/*===========ACCORDION START=================*/

input.accordion-check {
    position: absolute;
    opacity: 0;
    z-index: -1;
}

.accordion {
    overflow: hidden;

    .accordion-label {
        display: flex;
        justify-content: space-between;
        cursor: pointer;
        padding: 1rem;
        margin: 0;
        width: calc(100% - 2rem);
        /* same as h4 */
        font-weight: var(--typography-fontWeightRegular);
        font-size: 2.125rem;
        line-height: 1.235;
        letter-spacing: 0.00735em;


        /* Icon */

        &:hover {
            background: var(--action-background-active);
        }

        &::after {
            content: "\276F";
            width: 1em;
            height: 1em;
            text-align: center;
            transition: all .35s;
        }

    }

    .accordion-content {
        max-height: 0;
        padding: 0 1em;
        transition: all .35s;

        border-top-style: solid;
        border-top-width: 1px;
    }

    .accordion-close {
        display: flex;
        justify-content: flex-end;
        padding: 1em;
        font-size: 0.75em;
        cursor: pointer;

        &:hover {
            background: var(--action-background-hover);
        }
    }

    border-spacing: 0;
    border-style: solid;
    border-width: 1px;
    border-radius: 8px 8px 0 0;

    margin: 1.5rem 0;
}

/* checked */
input.accordion-check:checked {
    + .accordion-label {
        background: var(--action-background-active);

        &::after {
            transform: rotate(90deg);
        }
    }

    ~ .accordion-content {
        max-height: fit-content;
        padding: 1em;
    }
}

/*====================ACCORDION END=======================*/
.profileDisplay {
    .profileNameOnCard {
        font-size: 1.2rem;
        font-weight: var(--typography-fontWeightMedium);
    }

    .roster-avatar {
        width: 100px;
        height: 100px;
    }

    .details {
        margin-left: 20px;
        width: 100%;
    }
}

.my-section {
    .profileContainer {
        width: 100%;
        display: inline-block;
    }

    .profileDisplay {
        margin: 0.5rem .25rem 0.5rem .25rem;
        padding: 1rem;
        border-radius: 8px;
        border-style: solid;
        border-color: var(--divider);
    }
}

.registrationCommandButtons {
    ul.registrationCommandOptions {
        list-style-type: none;
        padding-inline-start: 0;

        li {
            display: inline-block;
        }
    }
}

div.scrollable-table {
    overflow-x: auto;
    overflow-y: auto;
    width: 100%;
}

.registrationProfileTable {
    .registrationCommandButtons {
        ul.registrationCommandOptions {
            border-radius: 15px;
            padding: 10px;
            width: 200px;
            transition: var(--transition-style);
            background-color: var(--background-secondary);
            border-color: var(--divider);
            box-shadow: var(--shadow-4);

            margin-left: -181px;

            li {
                display: block;
                padding: 8px 10px 8px 20px;
                font-weight: var(--typography-fontWeightMedium);

                a.error, a:hover.error, a:visited.error {
                    color: var(--error-main);
                }
            }

            li.closeMenu {
                padding: 0;
                float: right;
                text-transform: uppercase;
                font-size: smaller;
                border: var(--border-color);

                a:hover {
                    color: var(--action-text-hover);
                }

                a,
                a:visited {
                    color: var(--action-text);
                }

            }
        }
    }

    th {
        padding-top: 0.8rem;
        text-wrap: nowrap;
    }

    th span {
        writing-mode: vertical-lr;
    }

    th.reg-tbl-pid span,
    th.reg-tbl-handle span,
    th.reg-tbl-roles span {
        writing-mode: horizontal-tb;
    }

    .reg-tbl-pid {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
    }

    .reg-tbl-handle {
        min-width: 160px;
        width: 160px;
        max-width: 160px;
        white-space: nowrap;
        overflow: scroll;
        scrollbar-width: none;
    }

    .reg-tbl-started {
        border-left: solid 5px var(--divider);
    }

    .reg-tbl-started,
    .reg-tbl-profile,
    .reg-tbl-emerg,
    .reg-tbl-agree,
    .reg-tbl-status,
    .reg-tbl-actions {
        width: 20px;
        max-width: 20px;
        min-width: 20px;
    }

    .reg-tbl-actions,
    .reg-tbl-alumni,
    .reg-tbl-first-aid{
        border-right: solid 5px var(--divider);
    }
}

.checkbox-tile {
    display: inline-block;
}


.mailbox-container {
    display: grid;
    grid-template-columns: 60px 150px 1fr 200px;
    grid-template-areas: "to from content time";
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid var(--divider);
    padding: 3px 0;
    background-color: var(--background-default);

    span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        align-self: center;
        justify-self: start;
        min-width: 0;

        .tooltiptext {
            visibility: hidden;
            background-color: var(--action-background-disabled);
            border: 1px solid var(--action-border-disabled);
            text-align: center;
            padding: 0 4px;
            border-radius: 6px;
            opacity: 0;
            transition: opacity 0.2s ease-in-out;
            position: absolute;
            z-index: 1;
            margin-left: 3px;
        }
    }

    .to {
        grid-area: to;
        justify-self: center;
        max-width: 120px;
    }

    .from {
        max-width: 150px;
        grid-area: from;

        .tooltiptext {
            margin-left: 120px;
        }
    }

    .content {
        grid-area: content;
        max-width: 100%;

        span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .subject {
        }

        .message {
            color: var(--text-secondary);
        }
    }

    .time {
        grid-area: time;
        justify-self: end;
    }

    span:hover .tooltiptext {
        visibility: visible;
        opacity: 1;
        transition-delay: .5s;
    }

    span:not(:hover) .tooltip {
        transition-delay: 0s;
    }
}

.mailbox-container span .tooltip .tooltiptext::after {
    content: " ";
    position: absolute;
    top: 50%;
    left: 100%; /* To the right of the tooltip */
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent cyan;
}

.mailbox-container:hover {
    background-color: var(--action-background-hover);
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .mailbox-container {
        max-width: 100%;
        grid-template-areas: "to from time"
                             "content content content";

        grid-template-columns: 30px 1fr 170px;
        grid-template-rows: 30px 30px;

        .to {
            max-width: 30px;
        }

        .from {
            max-width: 100%;
            width: auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .time {
            max-width: 170px;
        }

        .content {
            padding-left: 5px;
            width: auto;
            min-width: 0;
            max-width: calc(100% - 10px);
        }
    }
}

div.message-container {
    width: 100%;
    display: inline-block;

    div.body {
        border-radius: 8px;
        margin-top: .5rem;
        margin-bottom: 3rem;
        border-color: var(--divider);

        width: 100%;
        height: auto;
        background-color: white;

        iframe {
            width: 100%;
        }
    }

    span {
        width: 100%;
        display: grid;
        grid-template-columns: auto auto;

        .sender {
            align-self: center;
            justify-self: start;
        }

        .sent {
            align-self: center;
            justify-self: end;
        }
    }

    .to {
        width: auto;
        min-width: 0;
    }

    .message-tooltip {
        position: relative;
        display: inline-block;

        .tooltiptext {
            visibility: hidden;
            min-width: 100px;
            width: auto;
            max-width: 375px;
            background-color: #555;
            color: #fff;
            border-radius: 6px;
            padding: 5px;
            position: absolute;
            z-index: 1;
            top: 100%;
            left: 0;
            margin-top: 5px;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .tooltiptext::after {
            content: "";
            position: absolute;
            bottom: 100%;
            left: 50px;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: transparent transparent #555 transparent;
        }

        &:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }
    }
}

div.communication-container {
    display: grid;
    grid-template-areas: "inbox-folder mailbox"
                         "sent-folder mailbox"
                         "section-folder mailbox"
                         "members-folder mailbox"
                         "registrants-folder mailbox"
                         "empty mailbox";
    grid-template-columns: 150px auto;
    grid-template-rows: 30px 30px 30px 30px auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;

    border-spacing: 0;
    border-style: solid;
    border-width: 1px;
    border-radius: 8px;
    border-color: var(--divider);

    div.inbox-folder,
    div.sent-folder,
    div.section-folder,
    div.members-folder,
    div.registrants-folder {
        padding: .25rem .25rem .25rem .7rem;
        align-content: center;
        width: calc(100% - 5px);
        height: 100%;
    }

    .inbox-folder {
        grid-area: inbox-folder;
    }

    .sent-folder {
        grid-area: sent-folder;
    }

    .section-folder {
        grid-area: section-folder;
    }

    .org-folder {
        grid-area: org-folder;
    }

    .inbox-folder:hover,
    .sent-folder:hover,
    .section-folder:hover,
    .members-folder:hover,
    .registrants-folder:hover {
        background-color: var(--action-background-hover);
        cursor: pointer;
    }

    .mailbox {
        grid-area: mailbox;
        border-left: 1px solid var(--divider);
        .even {
            color: var(--text-secondary);
            background-color: var(--background-secondary);
        }
        span {
            padding: .25rem .5rem;
        }
    }
    .mailbox-header {
        font-weight: bolder;
        color: var(--text-secondary);
        background-color: var(--background-secondary);
    }
    .empty-mailbox {
        padding: 3rem;
        justify-self: center;
        align-self: center;
    }

    @media screen and (max-width: 768px) {
        display: block;
        div.inbox-folder,
        div.sent-folder,
        div.section-folder,
        div.members-folder,
        div.registrants-folder {
            display: inline-block;
            padding-right: 2rem;
        }
    }
}

.email-attendees-button {
    align-self: start;
    justify-self: center;
}