@font-face {
    font-family: "subway";
    src: url("/assets/font/SubwaySans-Regular-Cy-Gr-Web.woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "subway";
    src: url("/assets/font/SubwaySansCond-Medium-Web.woff2");
    font-weight: normal;
    font-stretch: condensed;
}

@font-face {
    font-family: "subway";
    src: url("/assets/font/SubwaySans-Bold-Cy-Gr-Web.woff2");
    font-weight: 500 1000;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: "subway";
    src: url("/assets/font/SubwaySansCond-Bold-Web.woff2");
    font-weight: 500 1000;
    font-stretch: condensed;
}

:root {
    --sbwy-green: #008938;
    --primary-color: #437b3c;
    --primary-light-color: #96c23a;
    --secondary-color: #fbbb00;
    --tertiary-color: hsl(210, 81%, 63%);
    --tertiary-light-color: hsl(210, 81%, 73%);
    --light-gray-color: #aaa;
    --lighter-gray-color: #eaeaea;
    --shadow-spread: 4px;
    --shadow-blur: 8px;
    --min-width: 360px;
}

*, *::before, *::after {
    margin: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background-color: white;
}

body, input, textarea, button, dialog {
    font-family: "subway";
    font-stretch: condensed;
    line-height: 1.5;
    color: var(--primary-color);
}

img {
    display: block;
}

header {
    margin-bottom: 2rem;
}

header, dialog {
    box-shadow: 0 0 var(--shadow-blur) var(--shadow-spread) var(--light-gray-color);
}

#logo {
    width: 12rem;
    margin-left: 1rem;
}

dialog {
    margin: auto;
    border: none;
    min-width: calc(var(--min-width) - 1rem);
}

dialog::backdrop {
    backdrop-filter: blur(4px);
}

h1 {
    color: var(--primary-color);
    text-transform: uppercase;
    font-stretch: expanded;
}

.lighter-gray__wrapper {
    padding: 1rem;
    border-top: 4px solid var(--secondary-color);
    background-color: var(--lighter-gray-color);
    font-weight: bold;
}

.flex {
    display: flex;
    gap: 1rem;
}

.flex:not(.flex-column) {
    align-items: center;
}

label.flex:not(.flex-column) {
    align-items: baseline;
}

.flex-column {
    flex-direction: column;
}

.flex__space-between {
    justify-content: space-between;
}

.flex__center {
    justify-content: center;
}

.flex__wrap {
    flex-wrap: wrap;
}

::-webkit-input-placeholder, ::placeholder {
    color: white;
    opacity: 1;
}

.conditions {
    overflow: hidden auto;
    font-size: 0.7rem;
    font-stretch: normal;
}

.conditions > ol {
    padding: 0 2em;
}

li {
    margin-bottom: 1em;
}

.text_center {
    text-align: center;
}

.text_bold {
    font-weight: bold;
}

input {
    border: none;
    background-color: transparent;
    font-size: 1rem;
    padding-inline: 0.5em;
}

input:focus {
    outline: none;
}

input[name="code"]::-webkit-input-placeholder, input[name="code"]::placeholder {
    color: var(--secondary-color);
}

label {
    display: flex;
    position: relative;
}

.submit__wrapper {
    background-color: var(--secondary-color);
    position: relative;
    padding-block: 1rem;
    z-index: 1;
}

.submit__wrapper::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    background-color: white;
    transform: translateY(-50%);
    z-index: -1;
}

input[type="submit"] {
    background-color: var(--secondary-color);
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold;
    font-stretch: normal;
    text-transform: uppercase;
    padding: 0.25em 0.75em;
    border: 2px solid white;
    border-radius: 1em;
    outline: 8px solid var(--secondary-color);
}

.box {
    padding: 1rem;
    color: white;
}

.formular__box {
    background-color: var(--primary-light-color);
}

.conditions__box {
    background-color: var(--primary-color);
}

.conditions__box h3 {
    color: var(--secondary-color);
}

h3 {
    letter-spacing: 0.05em;
    font-weight: normal;
    margin-bottom: 1rem;
}

input, h3 {
    border-bottom: 2px solid var(--secondary-color);

}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(312px, 1fr));
}

.formular > input {
    width: 90%;
}

.formular > input:not(:last-of-type) {
    margin-bottom: 0.5em;
    width: 90%;
}

.box label:first-of-type {
    margin-top: 1em;
    border-top: 2px solid transparent;
}

.box.conditions__box label:first-of-type {
    padding-top: 1em;
    border-top: 2px solid var(--secondary-color);
}

footer {
    margin-top: 2rem;
    background-color: var(--secondary-color);
}

footer > .container {
    padding: 1rem;
}

footer a {
    color: var(--primary-color);
}

a {
    color: var(--secondary-color);
}

.error__wrapper {
    display: none;
    background-color: red;
    color: white;
    padding: 0.5em 1em;
    text-align: center;
}

@keyframes shake1 {
    0% {
        margin-left: 0;
    }
    25% {
        margin-left: 0.15rem;
    }
    75% {
        margin-left: -0.15rem;
    }
    100% {
        margin-left: 0;
    }
}

.error {
    animation: shake1 0.15s ease-in-out 0s 2;
}

.small_font {
    font-size: 0.75rem;
}

.full_width {
    width: 100%;
}

section {
    padding-inline: 1rem;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}