:root {
    --bg-color: #f9f9f9;
    --bg-accent-color: #fff;
    --text-color: #585858;
    --primary-color: #996699;
    --secondary-color: #6699cc;
    --tertiary-color: #663366;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    font-family: Inter,system-ui,-apple-system,BlinkMacSystemFont,helvetica,Arial,sans-serif;
    margin: 0;
}

h1,h2,h3,h4,h5,h6 {
    font-weight: 600;
    margin: 0;
}

button {
    background: none;
    border: none;
    margin: 0 0.2em;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}

.container {
    display: grid;
    grid-template-columns: minmax(min-content, 15em) auto;
}

.main-panel {
    grid-column: 2;
    display: grid;
    grid-template-rows: auto auto;
}

.settings-panel {
    grid-row: 1;
    background-color: var(--bg-accent-color);
    padding: 0.75em 0.5em 0.5em 1.35em;
    border-bottom: 2px solid var(--secondary-color);
}

.analyses {
    grid-row: 2;
    height: calc(100vh - 4em);
    padding: 0.5em 0.5em;
    overflow: auto;
    display: flex;
    flex-flow: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    align-content: flex-start;
}

.analysis-controls {
    padding-left: 1em;
}

.side-panel {
    grid-column: 1;
    background-color: var(--bg-accent-color);
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
    display: grid;
    grid-template-rows: 2em 1.5em auto 1em;
    height: calc(100vh - 1em);
    padding: 0.5em 0 0.5em 0.5em;
    z-index: 1;
    resize: horizontal;
    overflow: auto;
    min-width: 15em;
    max-width: 40em;
    resize: horizontal;
    overflow: auto;
    min-width: 15em;
    max-width: 40em;
    resize: horizontal;
    overflow: auto;
    min-width: 15em;
    max-width: 40em;
}

.side-title {
    grid-row: 1;
}

.filter-box {
    grid-row: 2;
}

.switches-list {
    grid-row: 3;
    overflow: auto;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.side-footer {
    grid-row: 4;
}

.hide-side-panel {
    float: right;
    font-size: 1em;
    line-height: 1em;
    display: none;
}

.switches-list-item {
    white-space: nowrap;
}

.switches-list-name {
    cursor: pointer;
}

.source-badge {
    color: var(--primary-color);
    background-color: var(--bg-color);
    margin-left: 0.2em;
    font-size: 0.8em;
    border-radius: 0.4em;
    padding: 0.1em 0.3em;
}

.add-switch-dialog {
    position: absolute;
    left: 0;
    background-color: var(--bg-color);
    min-width: 13em;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 0.5em 0.8em;
    z-index: 2;
}

.dialog-list {
    list-style: none;
    margin: 0;
    padding-left: 2.5em;
}

.dialog-list-item::before {
    content: 'add to ';
    margin-left: -2.9em;
}

.dialog-list-item-new::before {
    content: 'add as ';
}

.main-message {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: center;
}

.instructions {
    list-style: none;
}

.instructions > li::before {
    content: "☞ ";
}

.source-link {
    margin-right: 0.3em;
}

.vega-embed {
    min-width: 700px;
    width: 100%;
}

@media only screen and (max-width: 768px) {
    .container {
        grid-template-columns: 0 auto;
    }

    .side-panel {
        width: 250px;
        position: absolute;
        top: 0;
        left: 0;
        transition: left 0.5s ease-in;
    }

    .side-panel.hidden {
        left: -260px;
    }

    .hide-side-panel {
        display: block;
    }
    .hide-side-panel.collapsed {
        position: relative;
        left: 25px;
    }
}
