/* Reset CSS */
*,
*::before,
*::after {
    box-sizing: border-box;
    position: relative;
}
* {
    margin: 0;
}
@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
input,
button,
textarea,
select {
    font: inherit;
    border: none;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}
p {
    text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}
#root {
    isolation: isolate;
}

/* My CSS */
:root {
    --theme: "light";
    color-scheme: dark;

    --background: #000;
    --foreground: #fff;

    /* @media (prefers-color-scheme: dark) {
        --theme: "dark";
        color-scheme: dark;

        --background: #0a0a0a;
        --foreground: #ededed;
    } */
}

body {
    color: var(--foreground);
    background: var(--background);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    padding: 0.5em;
}

.hidden {
    display: none;
}

[x-cloak] {
    display: none !important;
}

input,
select,
button {
    padding: 0.3em 0.2em;
}

input,
select {
    background: #fff;
    border: 1px solid var(--background);
    color: var(--background);
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

button {
    font-size: 1.3em;
    background: #4a5d27;

    &:hover {
        cursor: pointer;
    }
}

input,
select,
button {
    &:focus-visible {
        outline: 1px solid #000;
    }
}

button:focus-visible {
    outline-width: 2px;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#main_logo,
h1 {
    text-align: center;
}

#main_logo img {
    width: auto;
    max-width: 600px;

    @media (width <= 600px) {
        width: 100%;
    }
}

#entry_form {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.75em;
    background: #d4480d;
    border: 1px solid #7e120a;
    padding: 10px 15px 15px;

    @media (width <= 600px) {
        input,
        select {
            margin-top: -0.75em;
        }
    }
}

#submit {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2em;

    .loader {
        width: 1em;
        height: 1em;
        border-width: 3px;
    }

    &[disabled] {
        background: #7d8d5f;
    }
}

@media (width > 600px) {
    #entry_form {
        max-width: 600px;
        margin: 0 auto;
        grid-template-columns: 130px 1fr;
        align-items: center;

        h1,
        .success,
        button {
            grid-column: 1 / span 2;
        }
    }
}

.success {
    width: 100%;
    margin: 0 auto 1em;
    padding-block: 1.5em;
    text-align: center;
    background: #00aa00;
}
