:root {
    --header-height: 6rem;
    --footer-height: 0rem;
}

* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Approachholtmann';
    src: url('https://uploads-ssl.webflow.com/61dc7eaa8230075cc785d685/61dc7eaa8230072e2585d6b3_ApproachHoltmann-Rg.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html {
    font-size: calc(100vw/192);
}

/* 
@media only screen and (max-width: 600px) {
    html {
        font-size: calc(100dvw / 80);
    }
}

@media only screen and (min-width: 600px) {
    html {
        font-size: calc(100dvw / 150);
    }
}

@media only screen and (min-width: 1440px) {
    html {
      font-size: calc(100svw / 192);
    }
} */

body {
    height: 100dvh;
    width: 100dvw;
    overflow: hidden;
    margin: 0px;
    padding: 0px;
    background-color: var(--color-background);
    color: var(--color);
    font-family: var(--font-family);
    opacity: 1;
    padding: 1rem;
}

h1 {
    font-size: 6.2rem;
    font-weight: 300;
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0;
}

h2 {
    font-size: 3.2rem;
    font-weight: 300;
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0;
}

main {
    height: calc(100% - var(--header-height) - var(--footer-height) - 1rem);
    display: flex;
    flex-direction: row;
}

button {
    &:disabled {
        opacity: 0.5;
    }
}

content {
    position: relative;
    /* box-shadow: var(--shadow); */

    display: flex;
    flex: 1;

    overflow: hidden;
    font-size: 1.8rem;
    padding: 1rem;
    border-radius: var(--border-radius);

    &#gfxList {
        #eventHeader {
            text-wrap: nowrap;
        }
        #tableSelectControls {
            /* visibility: hidden; */
            /* width: min-content; */
        }

        /* &:has(tr.selected) {
            #tableSelectControls {
                visibility: visible;
            }
        } */
    }
}

aside {
    height: 100%;
    max-width: 30dvw;
    transition: all 0.5s;

    &:not(.open) {
        max-width: 0px;
    }

    nav {
        background-color: var(--color-background-secondary);
        margin-left: 1rem;
        box-shadow: var(--shadow);

        width: 24svw;
        height: 100%;
        padding-inline: 10rem;
        padding-block: 5rem;
        border-radius: var(--border-radius);


        a {
            font-size: 1.8rem;
            text-decoration: none;
            color: var(--color-mute);
            transition: color .3s;
            white-space: nowrap;

            &:hover {
                color: var(--color);
            }

            &.active {
                color: var(--color);
            }
        }
    }
}

.error {
    color: red;
    font-size: 150%;
}

#loadingOverlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: #fbfbfb;
    display: grid;
    place-content: center;
    z-index: 100;
    transition: opacity 0.3s linear;
    font-size: 3rem;
}

header {
    background-color: var(--color-background-secondary);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);

    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 3.5rem;
    border-radius: var(--border-radius);

    #headerTitle {
        font-size: 250%;
        font-weight: bold;
        position: absolute;
        left: 50%;
        translate: -50% 0;
        max-width: 50svw;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    img {
        height: calc(var(--header-height) - 2rem);
        max-width: 20rem;
        object-fit: contain;
        /* margin-bottom: .6rem; */
    }
}

footer {
    /* height: var(--footer-height);
    width: 100%;

    padding-left: 1.252rem;
    padding-block: 1rem;

    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;

    background: #f2f2f2;
    color: #121517;

    font-size: 1.6rem; */
}

#table_wrapper {
    height: 96%;
    width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    background-color: var(--color-background-mute);
    border-radius: var(--border-radius);
    display: flex;
    overflow: hidden;

    >div {
        /* overflow: auto; */
        height: 100%;
        /* background-color: white; */
        border-radius: var(--border-radius);

    }

    #addButton {
        position: absolute;
        right: 50px;
        bottom: 30px;

        display: flex;
        justify-content: center;
        align-items: center;

        width: 80px;
        height: 80px;

        border-radius: 100%;
        background-color: var(--color-background-accent);

        opacity: 0.5;
        transition: all 0.3s;

        &:hover {
            opacity: 1;
            scale: 1.2;
        }

        &:active {
            scale: 0.8;
        }
    }

}

table.dataTable {

    display: flex;
    flex-direction: column;
    empty-cells: show;

    font-size: 1.8rem;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--color-background-secondary);

    tbody {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
        overflow: auto;
    }

    thead {
        position: relative;
        display: block;
        width: 100%;
        /* height: 20svh; */
        /* overflow-x: scroll; */

        /* position: sticky;
        top: 0; */

        border-radius: var(--border-radius);
        background-color: var(--color-background-mute);

        td {
            padding: 1rem !important;
        }

        th {
            overflow: hidden;
            text-overflow: ellipsis;
            height: auto !important;

            &.selected {

                span {
                    display: inline;
                }
            }
        }

        /* background-color: white; */

        input,
        select {
            background-color: white !important;
            height: auto !important;
            width: calc(100% - 4px) !important;
            /* margin: 2px; */
        }

        tr {
            background-color: var(--color-background-secondary);
            /* background-color: white; */
            vertical-align: top;
            height: fit-content;
        }

        .div_checklist {

            height: fit-content;
            max-height: 15svh;

            .flt_checklist_item {

                &.available {}

                &.unavailable {
                    background-color: rgb(203, 203, 203);
                    /* pointer-events: none; */
                }

                input {
                    width: unset !important;
                }
            }
        }


    }

    tr {

        width: 100%;
        display: flex;

        td,
        th {
            flex-basis: 100%;
            flex-grow: 1;
            display: block !important;
            padding: 1rem;
            text-align: left;
        }

        >th:first-child,
        >td:first-child {
            flex-basis: 10rem;
            flex-shrink: 0;
            flex-grow: 0;
        }

        /* >th:nth-child(even),
        >td:nth-child(even) {
            flex-basis: 30rem;
        } */

        >td:has(input) {
            /* padding: 1px !important; */
        }

        >td>input {
            background-color: transparent;
            width: 100%;
            height: 100%;
            border: none !important;
            cursor: text !important;

            &:focus {
                outline: 1px solid var(--color-background-accent) !important;
            }
        }

        &.selected {
            background-color: var(--table-row-selected) !important;

            span {
                display: inline;
            }
        }
    }

    td,
    th>span {
        white-space: nowrap;
        text-overflow: ellipsis;
        /* max-width: 300px; */
        overflow: hidden;
    }

    /* tr:nth-child(even) {
        background-color: var(--color-background-mute);
    }

    tr:nth-child(odd) {
        background-color: var(--color-background-secondary);
    } */

    tr.active {
        background-color: var(--color-background-highlight);
    }

    .selectTH,
    .selectTD,
    thead:has(.selectTH) td:nth-child(1) {
        flex-basis: 4rem !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        padding: 0 !important;
        text-align: center;
    }

    .selectTD {
        >* {
            display: none;
        }
    }

}

.auth_wrapper {
    margin: -1rem;
    width: calc(100% + 2rem);
    height: calc(100% + 2rem);
    display: grid;
    place-content: center;
    color: var(--color);

    .auth {
        width: 50rem;
        background: var(--color-background-secondary);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);

        img {
            width: 100%;
        }

        span,
        a {
            text-decoration: none;
            font-size: 1.8rem;
        }

        button,
        input {
            font-size: 2.222rem !important;
        }
    }
}

.boothDetails {
    background-color: white;

    #table_wrapper {
        max-height: calc((100vh - var(--header-height) - 3rem) / 3)
    }
}

.tabs {
    .tab {
        cursor: pointer;
        padding: 1rem 2rem;
        background-color: var(--color-background-secondary);
        border: 1px solid var(--color-background-secondary);
        box-shadow: inset -1px -1px 1px rgba(0, 0, 0, 0.3);

        &.active {
            border: 1px solid var(--color-background-accent);
            background-color: var(--color-background-accent);
            color: var(--color-accent);
        }

        &:hover {
            border: 1px solid var(--color-background-accent);
        }
    }
}

.tabContent {
    overflow-y: scroll;
    height: 100%;
    display: none;

    &.active {
        display: flex;
        flex-direction: column;
    }

    &#content1>div:last-child {
        flex-wrap: wrap;

        img {
            max-width: 500px;
            max-height: 500px;
            border: 1px solid var(--color);
        }
    }
}

.success {
    color: green;
    font-size: 90%;
    padding-left: 1rem;
}


#edit {
    form {
        height: 100%;
        overflow: hidden;

        >.col {
            /* width: min-content; */
            overflow: auto;
            height: 100%;
            /* flex-wrap: wrap; */
            column-gap: 40px;
            row-gap: 10px;

            label {
                display: flex;
                flex-direction: column;
                width: 60rem;
                gap: 10px;

                textarea {
                    min-height: 200px;
                }

                .error {
                    color: red;
                    font-size: 90%;
                    padding-left: 1rem;
                }

                &:has(.error) {

                    >input,
                    textarea,
                    select {
                        border: 3px solid red;
                    }
                }



                input,
                select,
                textarea {
                    resize: none;
                }
            }
        }

        >.row {
            .error {
                color: red;
                font-size: 150%;
            }
        }
    }


}

.html-preview {
    min-height: 200px;
}

#popup {
    position: fixed;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 5;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fade-in 0.5s;
    transition: all 0.5s;

    #popup-inner {
        background-color: var(--color-background);
        padding: 20px;
        box-shadow: 3px 3px 10px 5px rgba(0, 0, 0, 0.589);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        animation: scale-in 0.5s;
        transition: all 0.5s;

        h2 {
            text-align: center;
        }

        p {
            font-size: 16px;
            width: 100%;
        }

        a {
            width: 100%;
            max-width: 150px;
        }
    }
}

.transferList {

    border: 1px solid black;
    border-radius: var(--border-radius);

    .globalListWrapper,
    .localListWrapper {
        width: 50%;
        padding: 1rem;
    }

    .localList,
    .globalList {
        height: 400px;
        overflow-y: auto;
        align-items: center;
    }

    .transferListItem {
        padding: 0.5rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .transferListItem:hover {
        background-color: rgba(0, 0, 0, 0.2);
    }

    .localList {

        .localListItem {
            text-align: start;
            min-width: 50%;
        }

        .localListItem::after {
            content: '';
        }
        .localListItem:hover::after {
            content: url('../images/arrow-right.svg');
            display: inline-block;
            height: 20px;
            vertical-align: middle;
            line-height: normal
        }

    }

    .globalList {

        .globalListItem {
            text-align: end;
            min-width: 50%;
        }

        .globalListItem::before {
            content: '';
        }

        .globalListItem:hover::before {
            /* content: '<'; */
            content: url('../images/arrow-left.svg');
            display: inline-block;
            height: 20px;
            vertical-align: middle;
            line-height: normal
        }

    }
}

.modal {
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	height: 100dvh;
	width: 100dvw;
	/* backdrop-filter: blur(15px); */
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 98;

	.modal-backdrop {
		position: absolute;
		inset: 0;
		background-color: rgba(0, 0, 0, 0.7);
	}

	.modal-content {
		z-index: 99;

		display: flex;
		flex-direction: column;
		gap: 2rem;

		position: relative;
		background-color: var(--color-background);

		max-width: 90svw;
		max-height: 90svh;

		padding: 2rem;

		overflow: hidden;

		.modal-body {
			padding-block: 1rem;
			padding-inline: 3rem;
			overflow-x: hidden;
			overflow-y: auto;
		}
	}
}

.breadcrumbs {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.breadcrumbs a {
    text-decoration: none;
    white-space: nowrap;
}

.breadcrumbs a:link,
.breadcrumbs a:visited {
    color: var(--color);
}

.breadcrumbs a:hover,
.breadcrumbs a:active {
    color: var(--color-background-highlight);
}


.breadcrumbs a:last-child:not(.backLink) {
    pointer-events: none;
}

button.btn a.backButton {
    text-decoration: none;
}
button.btn a.backButton:link,
button.btn a.backButton:visited {
    color: var(--color);
}
button.btn:hover a.backButton,
button.btn a.backButton:hover {
    color: #fff;
}

@keyframes fade-in {
    from {
        backdrop-filter: blur(0px);
        background-color: rgba(0, 0, 0, 0);
    }

    to {
        backdrop-filter: blur(5px);
        background-color: rgba(0, 0, 0, 0.2);
    }
}

@keyframes scale-in {
    from {
        scale: 0;
    }

    to {
        scale: 1;
    }
}