@import url('reset.css');
@import url('icons.css');
@import url('popup.css');

@font-face {
    font-family: 'Futura';
    src:
        url('/fonts/Futura.woff') format('woff2'),
        url('/fonts/Futura.woff2') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    height: 100vh;
    width: 100vw;
    font-family: 'Futura', sans-serif;
    background-color: var(--background-primary-color);
    color: var(--text-primary-color);
}

input,
textarea,
button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: 'Futura', sans-serif;
}

/* Commonly used across pages */
.category-title {
    font-size: 1.5rem;
    padding: 1rem 0;
    font-weight: normal;
}

.main-container {
    box-sizing: border-box;
    padding: 0.5rem;
    padding-top: calc(3rem + 1rem + 3px);
    /* 3px is to account for the navbar's box shadow */
}

/* used by sidebar, popup window, and any other times body scroll has to be paused */
body.locked {
    overflow: hidden;
}

#sidebar {
    visibility: visible;
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    height: 100vh;
    z-index: 10;
    transition: left 0.3s ease-in-out;
    background-color: var(--background-primary-color);
    border-radius: 0 2rem 2rem 0;
    box-shadow: 1px 0px 5px 0px var(--background-primary-color);
}

#sidebar.slide-out {
    left: -100vw;
}

#sidebar.slide-in {
    left: 0;
}

#sidebar.hidden {
    visibility: hidden;
    left: -100vw;
}

/* overlay */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    opacity: 1;
    z-index: 9;
    transition: opacity 0.3s ease-in-out;
}

#sidebar-overlay.slide-out {
    opacity: 0;
}

#sidebar-overlay.slide-in {
    opacity: 1;
}

#sidebar-overlay.hidden {
    visibility: hidden;
    opacity: 0;
}

#sidebar-list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.sidebar-list-item {
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-primary-color);
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 1.25rem;
    gap: 1rem;
    transition: transform 0.1s ease;
}

.sidebar-list-item:active {
    transform: scale(1.05);
}

.sidebar-list-item.active {
    background-color: var(--background-secondary-color);
    border-radius: 2rem;
    font-weight: bold;
}

.sidebar-dropdown-list.hidden {
    display: none;
}

.sidebar-dropdown-list {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0 0.5rem 0.5rem 0.5rem;
    margin: 0 1.5rem 1rem 1.5rem;
    box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 2rem 2rem;
    gap: 0.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.sidebar-dropdown-list-item {
    color: var(--text-secondary-color);
    text-decoration: none;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.sidebar-list-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-dropdown-list-item .icon {
    aspect-ratio: 1/1;
}

/* navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background-color: var(--background-primary-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem;
    box-sizing: border-box;
    z-index: 3;
    box-shadow: 0px 0px 3px 0px var(--background-primary-color);
}

.navbar-icon {
    height: 3rem;
    width: 3rem;
    transition: transform 0.1s ease;
}

.navbar-icon:active {
    transform: scale(0.85);
}

.navbar-icon img {
    width: 100%;
    height: 100%;
}

#sidebar-toggle {
    width: 3rem;
    height: 3rem;
    box-sizing: border-box;
    padding: 0.25rem;
    transition: transform 0.1s ease;
    cursor: pointer;
}

#sidebar-toggle:active {
    transform: scale(0.85);
}

#sidebar-toggle .icon {
    width: 100%;
    height: 100%;
}

/* scroll buttons */
/* TODO: these are not on every page, so put into a seperate file later */
#scroll-buttons {
    position: fixed;
    bottom: 0;
    right: 0;
}

.scroll-button {
    width: 3rem;
    height: 3rem;
    background-color: var(--background-tertiary-color);
    margin: 0.5rem;
    box-sizing: border-box;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: transform 0.1s ease;
    cursor: pointer;
    user-select: none;
    box-shadow: 0px 0px 3px 0px var(--background-primary-color);
}

.scroll-button:hover {
    transform: scale(1.05);
}

.scroll-button:active {
    transform: scale(0.85);
}

.scroll-button .icon {
    width: 100%;
    height: 100%;
}
