@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    font-family: "Inter", sans-serif;

    --accent: #f00;
    --primary: #a00;
    --secondary: #600;
    --background: #300;

    --header: 3.5rem;

    /* --accent: #00f;
    --primary: #00a;
    --secondary: #006;
    --background: #003; */

    /* --accent: #f00;
    --primary: calc(var(--accent) / 2);
    --secondary: calc(var(--accent) / 4);
    --background: calc(var(--accent) / 8); */

    color: white;
    accent-color: var(--accent);
}

body {
    margin: 0;
    padding: 0;
    padding-top: calc(var(--header) + 0.5rem);
    height: 100vh;

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

    overflow: hidden;

    background-color: var(--background);
}

h1 {
    margin: 0.5rem;
    font-size: 2rem;
}

h2 {
    margin: 0.5rem;
    font-size: 1.5rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header);
    background-color: var(--accent);
    text-align: center;
    z-index: 1;
}

.field {
    max-height: calc(100vh - var(--header) - 3rem - 0.5rem * 3);
    aspect-ratio: 1/1;
    border-radius: 0.3rem;

    max-width: calc(100vw - (14rem * 2 + 3rem));

    position: absolute;
    top: calc(var(--header) + 0.5rem);
}

.menu {
    position: fixed;
    background-color: var(--primary);
    padding: 0.5rem;
    width: calc(45vw - 40vh);

    top: calc(var(--header) + 0.5rem);
    bottom: 0.5rem;

    min-width: 14rem;
    max-width: 30vw;

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

.left {
    left: 0;

    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.right {
    right: 0;

    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

/* Top fade */
.list::before,
.list::after {
    content: "";
    position: sticky;
    left: 0;
    right: 0;
    height: 1rem;
    /* size of fade */
    pointer-events: none;
    /* clicks pass through */
    z-index: 2;
    display: block;
}

.list::before {
    top: 0;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

.list::after {
    bottom: 0;
    background: linear-gradient(to top, var(--primary), transparent);
}

.list>li {
    /* margin: 0.5rem; */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    /* padding-top: 1rem;
    padding-bottom: 1rem; */
    padding: 0.5rem;
    background-color: var(--accent);
    border-radius: 1.25rem;

    position: relative;
    width: auto;
}

.list>li>div {
    position: relative;
    display: grid;
    /* display: inline-grid; */

    /* grid-template-columns: 30% 30% 30%; */
    /* grid-template-columns: auto; */
    /* grid-template-columns: 33% 33% 33%; */
    /* grid-template-columns: 10px 10px 10px; */

    column-gap: 0.5rem;

    align-items: center;
    justify-content: center;
    width: 100%;
    /* width: auto; */

    min-height: 0;
    min-width: 0;

    overflow: hidden;
    /* transition: all 0.5s ease-in-out; */
    height: 0;

    &.open {
        /* height: 10vh; */
        height: fit-content;
        margin-top: 0.5rem;
    }

    &>div {
        /* overflow: hidden; */
        min-width: 0;
        column-span: 1;

        &>input {
            width: calc(100% - 28px);
        }

        &>label {
            /* color: var(--secondary); */
            color: #ddd;
        }
    }
}

/* #waypoints>li>h2>i { */
i {
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
    /* margin-right: 0.5rem; */
    vertical-align: text-bottom;
}

.list>li>div>button {
    color: white;
    margin: -0.5rem;
    /* padding: 0.5rem; */
    font-size: 1.5rem;
    /* background-color: var(--secondary); */
    background: transparent;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer
}

.list>li>h2>button {
    color: white;
    margin: -0.5rem;
    font-size: 1.5rem;
    /* background-color: var(--secondary); */
    background: transparent;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;

    float: right;

    transition: all 0.12s ease-in-out;

    &:hover {
        color: darkred;
    }
}

input[type="range"] {
    accent-color: var(--accent);
    width: 98%;
}

.playbutton {
    margin: 0.5rem;
    padding: 0.1rem;
    font-size: 2rem;
    background-color: var(--secondary);
    border-radius: 100%;
    border: none;
    cursor: pointer;

    display: grid;
    align-items: center;

    width: 2.5rem;
    height: 2.5rem;

    color: white;
}

.input-container {
    position: relative;
    display: inline-block;
    font-family: Arial, sans-serif;
    padding-top: 0.3em;
    width: 100%;
}

label {
    position: absolute;
    top: -0.0em;
    left: 0.5em;
    background-color: var(--accent);
    padding: 0 4px;
    font-size: 14px;
    color: #c3c5c8;
}

input {
    border: 2px solid var(--primary);
    background-color: var(--accent);
    /* background: transparent; */
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    text-align: right;

    /* transition: all 0.2s ease-in-out; */
}

input:focus {
    border-color: #c3c5c8;
}

input::placeholder {
    color: #6c6f76;
}

.controls {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    align-content: center;

    margin: 0.5rem;
    background-color: var(--primary);
    border-radius: 1rem;
    padding: 0.1rem;

    position: absolute;
    /* bottom: 1rem; */
    top: calc(min(var(--header) + (100vw - (14rem * 2 + 3rem)) + 0.5rem, calc(100vh - var(--header) - 0.5rem)));

    max-width: calc(100vh - var(--header) - 3rem - 0.5rem * 3);
    width: calc(100vw - (14rem * 2 + 3rem));

    height: 3rem;
}

button,
select {
    background-color: var(--primary);
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
    border-bottom: 2px solid var(--secondary);

    transition: all 0.12s;

    &:hover {
        margin-bottom: calc(0.5rem - 1px);
        transform: translateY(-1px);
        border-bottom: 3px solid var(--secondary);
    }

    &:active {
        margin-top: calc(0.5rem - 1px);
        transform: translateY(1px);
        border-bottom: 1px solid var(--secondary);
    }
}