* {
    font-family: "Roboto", "Calibri", "Arial", sans-serif;
}

body {
    width: min-content;
    margin: auto;
    font-weight: 300;
}

h1 {
    text-align: center;
    margin: 1rem;
    font-weight: 300;
    font-size: 2rem;
}

div {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.5rem;
    column-gap: 0.2rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0.5rem 0;
}

button,
label {
    font-weight: 400;
    transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid;
    border-radius: 3px;
    padding: 3px 0px;
    margin: 0;
    background-clip: border-box;
    font-size: 1.1rem;
    cursor: pointer;
    min-width: 2.5rem;
}

button:disabled,
:disabled+label {
    cursor: not-allowed !important;
}

i {
    height: 18px;
    width: 18px;
    font-size: 1.1rem;
}

input[type="checkbox"],
input[type="radio"] {
    position: fixed;
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.radioGroup {
    column-gap: 0px;
}

input[type="radio"]+label {
    margin: 0;
    border-radius: 0;
}

input[type="radio"]:first-child+label {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.radioGroup label:last-child {
    border-right-width: 1px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

form {
    border: 3px solid;
    border-radius: 6px;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
}

table {
    border-spacing: 0;
    margin: auto;
    cursor: text;
    border-collapse: collapse;
}

td {
    padding: 0;
    border: 1px solid;
}

table input {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.4rem;
    border: 1px solid transparent;
    padding: 0;
    transition: background 0.5s;
    text-align: center;
    -moz-appearance: textfield;
}

tr:nth-child(3n+1) td {
    border-top-width: 3px;
}

tr:nth-child(3n) td {
    border-bottom-width: 3px;
}

td:nth-child(3n+1) {
    border-left-width: 3px;
}

td:nth-child(3n) {
    border-right-width: 3px;
}

input[type="number"]::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"]::-webkit-calendar-picker-indicator {
    display: none;
}

table input:enabled {
    cursor: inherit;
}

.forbidden {
    cursor: not-allowed !important;
}

.pencil,
::placeholder {
    font-size: 0.9rem !important;
}

#links {
    flex-direction: column;
    row-gap: .2rem;
}

a {
    text-decoration: none;
}

.context-menu {
    display: none;
    z-index: 1000;
    position: absolute;
    overflow: hidden;
    border: 1px solid;
    white-space: nowrap;
    font-family: sans-serif;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
    padding: 0;
    margin: 0;
    border-radius: 3px;
}

.context-menu li {
    padding: 6px 10px;
    cursor: default;
    list-style-type: none;
    transition: all .3s ease;
    font-size: 1rem;
}


/* Colors */

body {
    color: #273134;
    background-color: #f7f7f7;
}

form,
td {
    border-color: #d3e1e8;
}

table input {
    color: #303d41;
    background-color: #ffffff;
}

table input:enabled:hover {
    color: #273134;
}

:focus {
    border-color: rgba(46, 179, 152, 0.5);
}

:checked+label,
.context-menu li:hover {
    color: #ffffff;
    background-color: #2eb398;
}

:checked+label img {
    filter: invert();
    opacity: 100%;
}

:disabled,
:disabled+label,
.context-menu li.error {
    color: rgba(39, 49, 52, 0.55);
}

:disabled img,
:disabled+label img {
    opacity: 25%;
}

button,
input+label,
.context-menu {
    color: #273134;
    border-color: rgba(0, 0, 0, 0.15);
    background-color: #fcfcfc;
}

img {
    opacity: 70%;
}

:focus,
:focus+label {
    border-color: rgba(46, 179, 152, 0.5);
}

button:enabled:hover,
input:enabled:hover+label {
    color: #060808;
    background-color: white;
}

input:enabled:checked:hover+label {
    background-color: #59d4bc;
}

button:enabled:hover img,
input:enabled:hover+label img {
    opacity: 85%;
}

a {
    color: #248a76;
}

a:visited {
    color: #252f32;
}

a:hover {
    color: #2eb398;
}

a:active {
    color: #248a76;
}

.forbidden {
    background-color: #ebebeb;
}

.same-value {
    background-color: #ebebeb;
    color: #2eb398;
}

h1 {
    color: #2eb398;
}

@media (prefers-color-scheme: dark) {
    body {
        color: #abb9b6;
        background-color: #1b2224;
    }

    form,
    td {
        border-color: #3f5055;
    }

    img {
        filter: invert();
    }

    table input {
        color: #abb9b6;
        background-color: #222b2e;
    }

    table input:enabled:hover {
        color: #ccd7d4;
    }

    :focus {
        border-color: rgba(46, 179, 152, 0.7);
    }

    :checked+label,
    .context-menu li:hover {
        color: #ffffff;
        background-color: #2eb398;
    }

    :checked+label img {
        filter: invert();
    }

    :disabled,
    :disabled+label,
    .context-menu li.error {
        color: rgba(204, 215, 212, 0.45);
    }

    button,
    input+label,
    .context-menu {
        color: #ccd7d4;
        border-color: rgba(0, 0, 0, 0.25);
        background-color: #263034;
    }

    img {
        opacity: 70%;
    }

    :focus,
    :focus+label {
        border-color: rgba(46, 179, 152, 0.7);
        ;
    }

    button:enabled:hover,
    input:enabled:hover+label {
        color: #a1b5b0;
        border-color: rgba(0, 0, 0, 0.25);
        background-color: #38464b;
    }

    :enabled:hover+label img {
        opacity: 85%;
    }

    a {
        color: #6ddac4;
    }

    a:visited {
        color: #c7d0ce;
    }

    a:hover {
        color: #96e4d4;
    }

    a:active {
        color: #6ddac4;
    }

    .forbidden {
        background-color: #2d383b;
    }

    .same-value {
        color: #2eb398;
        background-color: #2d383b;
    }
}