:root {
    --modal-button-filter: none;
    --modal-bg: #ededede0;
    --modal-backdrop: rgba(0, 0, 0, .4);
}

[data-theme="dark"] {
    --modal-button-filter: invert(1) grayscale(100%) brightness(200%);
    --modal-bg: #212529e0;
    --modal-backdrop: rgba(0, 0, 0, .4);
}

/* I'm not gonna lie I stole this navigation from https://codepen.io/MPDoctor/pen/mpJdYe */
.tab-navigation {
    --nav-border-color: #ccc;
    overflow-x: hidden;
    height: 100vh;
}

.tab-navigation > [type="radio"] {
    display: none;
}

.tab-header {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
    list-style: none;
    padding: 0;
}

.tab {
    width: calc(100vw / 4);
    border-bottom: 1px solid var(--nav-border-color);

}
.tab > label {
    display: block;
    margin-bottom: -1px;
    padding: 12px 15px;
    border: 1px solid var(--nav-border-color);
    background: #eee;
    color: #666;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .5px;
    text-align: center;
    text-wrap: nowrap;
    transition: all 0.3s;
}

.tab:hover {
    border-bottom-color: #333;

}
.tab:hover label {
    color: #333;
}

.tab-content {
    display: none;
    color: #777;
}

.tab-navigation [type="radio"]:nth-of-type(1):checked ~ .tab-header .tab:nth-of-type(1) label,
.tab-navigation [type="radio"]:nth-of-type(2):checked ~ .tab-header .tab:nth-of-type(2) label,
.tab-navigation [type="radio"]:nth-of-type(3):checked ~ .tab-header .tab:nth-of-type(3) label,
.tab-navigation [type="radio"]:nth-of-type(4):checked ~ .tab-header .tab:nth-of-type(4) label {
    border-bottom-color: #b721ff;
    background: #fff0;
    color: #222;
}

.tab-navigation [type="radio"]:nth-of-type(1):checked ~ .tab-content:nth-of-type(1),
.tab-navigation [type="radio"]:nth-of-type(2):checked ~ .tab-content:nth-of-type(2),
.tab-navigation [type="radio"]:nth-of-type(3):checked ~ .tab-content:nth-of-type(3),
.tab-navigation [type="radio"]:nth-of-type(4):checked ~ .tab-content:nth-of-type(4) {
    display: block;
}

.toast {
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    text-align: center;
    padding: 24px 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 1.25em;
    transition: bottom .5s ease, opacity .5s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-backdrop);
}

.modal .close {
    all: unset;
    color: #aaa;
    margin-left: auto;
    font-size: 2em;
    font-weight: 600;
    display: block;
    text-align: right;
    cursor: pointer;
    height: 1em;
    line-height: 1em;
    margin-top: -1%;
}

.modal .close:hover {
    color: #888;
}

.modal .close:focus {
    color: #444;
}

.modal-content {
    background-color: var(--modal-bg);
    margin: 10% auto;
    padding: 1.5%;
    border: 1px solid #888;
    width: 90%;
    border-radius: 3px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

.modal-content canvas {
    bottom: 0px;
    width: 100%;
    margin: auto;
}