:root {
    --cancellation-ink: #20242a;
    --cancellation-muted: #6b7280;
    --cancellation-border: #d7dadf;
    --color-danger: #a94442;
    --bgcolor-danger: #fffafb;
    --bgcolor-icon-danger: #fdecf1;
    --color-success: #15803d;
    --bgcolor-icon-success: #effaf2;
}

header {
    border-bottom: 1px solid #eee;
    padding: 22px 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
}

header .back {
    font-size: 13px;
    color: var(--cancellation-muted);
    text-decoration: none;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

header .back:hover {
    color: var(--cancellation-ink);
    transition: color 0.3s ease;
}

header .logo img {
    height: 18px;
}

body[data-version='V4'] header .logo img {
    height: 24px;
}

body[data-code_iso='DEU20'] header .logo img {
    height: 30px;
}

body[data-version='V3'] a {
    outline: none;
    outline-offset: 0;
}

body[data-version='V3'] .c-button {
    text-shadow: none;
    line-height: 38px;
    font-size: 1em;
    padding: 10px 15px;
    border-radius: 0;
    height: auto;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--cancellation-ink);
    border: #d7dadf 1px solid;
    transition: all 0.3s ease;
}

body[data-version='V3'] .c-button:hover {
    background: #fafafa;
    border-color: #9aa0a8;
}

body[data-version='V3'] .c-button--primary, body[data-version='V3'] .c-button--ghost {
    color: #fff;
    background: #f5634e;
    border-color: #f5634e;
}

body[data-version='V3'] .c-button--primary:hover, body[data-version='V3'] .c-button--ghost:hover {
    background: #df4d39;
    border-color: #df4d39;
}

body[data-code_iso='DEU20'] .c-button--primary, body[data-code_iso='DEU20'] .c-button--ghost {
    color: #fff;
    background: black;
    border-color: black;
}

body[data-code_iso='DEU20'] .c-button--primary:hover, body[data-code_iso='DEU20'] .c-button--ghost:hover {
    background: #333;
    border-color: #333;
}

body[data-version='V3'] .c-loader-block .v3 {
    border: 5px solid #f5634e;
}

body[data-code_iso='DEU20'] .c-loader-block .v3 {
    border: 5px solid black;
}

main {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(40px, 7vh, 84px) 24px 64px;
}

main h1 {
    text-align: center;
    font-weight: 700;
    font-size: clamp(32px, 4.5vw, 50px);
    letter-spacing: -0.02em;
    margin: 6px 0 clamp(36px, 6vh, 60px);
    color: var(--cancellation-ink);
}

main form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.form-control {
    height: auto;
    border: none;
    box-shadow: none;
}

.form-control label {
    display: block;
    color: var(--cancellation-ink);
    font-weight: 600;
    font-size: 14px;
    padding: 7px 0;
}

.form-control label:after {
    content: '*';
    color: var(--color-danger);
    padding-left: 3px;
}

.form-control input[type="text"],
.form-control input[type="email"],
.form-control input[type="number"] {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 16px;
    color: var(--cancellation-ink);
    background: white;
    border: 1.5px solid var(--cancellation-border);
    border-radius: 10px;
    outline: none;
}

.form-control input[type="text"]:focus,
.form-control input[type="email"]:focus,
.form-control input[type="number"]:focus {
    box-shadow: 0 0 0 3px rgba(75, 85, 99, .12);
}

.form-error, .form-help, .terms {
    font-size: 12.5px;
    color: var(--cancellation-muted);
    margin: 0;
    padding: 4px 0;
}

.form-error {
    color: var(--color-danger);
}

.form-control input[type="text"].invalid,
.form-control input[type="email"].invalid,
.form-control input[type="number"].invalid {
    border-color: var(--color-danger);
    background-color: var(--bgcolor-danger);
}

.form-control input[type="text"].invalid:focus,
.form-control input[type="email"].invalid:focus,
.form-control input[type="number"].invalid:focus {
    box-shadow: 0 0 0 3px rgba(230, 55, 106, .14);
}

form > div.form-footer {
    display: grid;
    grid-template-areas: "terms button";
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr;
    align-items: center;
}

@media screen and (max-width: 520px) {
    form > div.form-footer {
        grid-template-areas: "button" "terms";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
    }
}

form > div.form-footer .terms {
    grid-area: terms;
}

form > div.form-footer .terms a {
    text-decoration: underline !important;
    color: var(--cancellation-ink) !important;
    font-weight: bold;
}

form > div:last-child .c-button {
    grid-area: button;
}

.error-order,
.error-mail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .2s ease, opacity .2s ease;
}

.error-order.show,
.error-mail.show {
    max-height: 100px;
    opacity: 1;
}


.grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
}

.overlay {
    position: fixed;
    inset: 0;
    display: grid !important;
    place-items: center;
    background: rgba(20, 22, 26, .55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    transition: opacity .2s ease, visibility .2s ease;
    padding: 25px;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.overlay .window, .overlay .loader {
    grid-area: 1 / 1;
    text-align: center;
    opacity: 0;
    visibility: hidden;
}

.overlay .window {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 18px;
    padding: 34px 34px 28px;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .08);
    pointer-events: none;
    transform: translateY(14px) scale(.97);
    transition: opacity .2s ease, transform .26s cubic-bezier(.2, .8, .25, 1), visibility .2s ease;
}

.overlay.show .window.show, .loader.show {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.window .icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.window .icon-danger {
    background: var(--bgcolor-icon-danger);
    color: var(--color-danger);
    font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
}

.window .icon-success {
    background: var(--bgcolor-icon-success);
    color: var(--color-success);
    font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
}

.message {
    margin: 0 0 28px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--cancellation-muted);
}
