.discountPopup {
    --discount-green: #23f000;
    position: fixed;
    inset: 0;
    width: min(94vw, 900px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: clamp(24px, 4vw, 42px) clamp(16px, 6vw, 78px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 2px solid var(--discount-green);
    border-radius: clamp(22px, 3vw, 40px);
    background: #080a09;
    color: #fff;
    color-scheme: dark;
    text-align: center;
}

.discountPopup::backdrop {
    background: rgb(0 0 0 / 76%);
}

html:has(.discountPopup[open]) {
    overflow: hidden;
}

.discountPopupClose {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.discountPopupClose::before,
.discountPopupClose::after {
    grid-area: 1 / 1;
    width: 24px;
    height: 2px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}

.discountPopupClose::after {
    transform: rotate(-45deg);
}

.discountPopupLogo {
    display: block;
    width: clamp(126px, 18vw, 220px);
    height: auto;
    margin: 0 auto clamp(16px, 3vw, 34px);
}

.discountPopup h2 {
    margin: 0;
    font-size: clamp(27px, 6.1vw, 76px);
    font-weight: 850;
    line-height: 1.06;
}

.discountPopup h2 strong {
    color: var(--discount-green);
    font-weight: inherit;
    white-space: nowrap;
}

.discountPopupSubtitle {
    margin-top: 5px;
    font-size: clamp(17px, 3.55vw, 40px);
    font-weight: 750;
    line-height: 1.14;
}

.discountPopupIntro {
    margin-top: clamp(12px, 2vw, 22px);
    font-size: clamp(14px, 2.35vw, 27px);
}

.discountPopupTerms {
    max-width: 57ch;
    margin: 8px auto 16px;
    color: #d4d8d3;
    font-size: clamp(12px, 1.6vw, 16px);
    line-height: 1.4;
}

.discountPopupForm {
    display: grid;
    gap: 10px;
}

.discountPopupForm[hidden],
.discountPopupError:empty,
.discountPopupSuccess:empty {
    display: none;
}

.discountPopupField {
    position: relative;
}

.discountPopupField svg {
    position: absolute;
    inset: 0 auto 0 15px;
    width: 22px;
    height: 22px;
    margin-block: auto;
    fill: none;
    stroke: #121412;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.discountPopupField input,
.discountPopupField select {
    display: block;
    width: 100%;
    min-height: clamp(44px, 5vw, 56px);
    padding: 8px 12px 8px 48px;
    border: 0;
    border-radius: 12px;
    background: #f7f7f7;
    color: #202220;
    color-scheme: light;
    font: inherit;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 600;
}

.discountPopupField input::placeholder,
.discountPopupField select:invalid {
    color: #515551;
}

.discountPopupBranch select {
    appearance: none;
    padding-right: 34px;
}

.discountPopupBranch::after {
    position: absolute;
    top: 50%;
    right: 15px;
    border: 7px solid transparent;
    border-top-color: #168500;
    border-bottom: 0;
    content: "";
    transform: translateY(-50%);
    pointer-events: none;
}

.discountPopupSubmit {
    justify-self: center;
    width: 91%;
    min-height: 48px;
    margin: 5px 0;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--discount-green);
    color: #081006;
    font: inherit;
    font-size: clamp(16px, 2.65vw, 29px);
    font-weight: 800;
    line-height: 1.18;
    cursor: pointer;
}

.discountPopupSubmit:disabled {
    opacity: .65;
    cursor: wait;
}

@media (min-width: 760px) {
    .discountPopupSubmit::after {
        margin-left: 1em;
        content: "→" / "";
    }
}

.discountPopupConsent {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 10px;
    font-size: clamp(12px, 1.6vw, 17px);
    line-height: 1.35;
    text-align: left;
}

.discountPopupConsent input {
    display: grid;
    appearance: none;
    flex: none;
    width: 22px;
    height: 22px;
    place-items: center;
    margin: 0;
    border: 2px solid #fff;
    border-radius: 4px;
    color: #080a09;
    cursor: pointer;
}

.discountPopupConsent input:checked {
    border-color: var(--discount-green);
    background: var(--discount-green);
}

.discountPopupConsent input:checked::after {
    width: 5px;
    height: 9px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    content: "";
    transform: translateY(-1px) rotate(45deg);
}

.discountPopupConsent a {
    color: var(--discount-green);
    text-decoration: underline;
}

.discountPopup :is(input, select, button, a):focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 3px;
}

.discountPopupField input:focus-visible,
.discountPopupField select:focus-visible {
    outline-color: var(--discount-green) !important;
    outline-offset: -3px;
}

.discountPopupError {
    color: #ffbaba;
    font-size: 14px;
}

.discountPopupSuccess {
    padding-block: 18px;
    color: var(--discount-green);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 750;
}

@media (max-width: 600px) {
    .discountPopup {
        width: min(92vw, 480px);
    }

    .discountPopup::backdrop {
        background: rgb(0 0 0 / 57%);
    }

    .discountPopupClose {
        top: 8px;
        right: 8px;
    }

    .discountPopup h2 {
        font-size: clamp(27px, 7.7vw, 43px);
    }

    .discountPopupSubmit {
        width: 100%;
    }
}
