.halloween-popup .modal-dialog {
    width: calc(100% - 24px);
    max-width: 831px;
    margin: 12px auto;
}

.halloween-popup .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: transparent;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.halloween-popup__scene {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    height: 542px;
    max-height: calc(100dvh - 24px);
    padding: 15px 24px;
    border-radius: 20px;
    background: #201922 url('../imgs/halloween-banner.webp') center / cover no-repeat;
}

.halloween-popup__panel {
    position: relative;
    box-sizing: border-box;
    width: 391px;
    max-width: 100%;
    height: 512px;
    max-height: calc(100dvh - 54px);
    overflow-y: auto;
    padding: 42px 20px 17px;
    border-radius: 20px;
    background: linear-gradient(105deg, #fffdfc 0%, #fff5f1 50%, #fde7db 100%);
    color: #000;
    scrollbar-color: #d9a991 transparent;
    scrollbar-width: thin;
}

.halloween-popup__close {
    position: absolute;
    top: 13px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.halloween-popup__close img {
    grid-area: 1 / 1;
    display: block;
}

.halloween-popup__close:focus-visible,
.halloween-popup__submit:focus-visible {
    outline: 2px solid #6a2a00;
    outline-offset: 3px;
}

.halloween-popup__heading {
    margin: 0 10px 10px;
}

.halloween-popup__eyebrow {
    margin: 0 0 10px;
    color: #f24405;
    font: 600 10px / 15.5px 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 1px;
}

.halloween-popup__heading h2 {
    margin: 0 0 9px;
    color: #000;
    font: 600 22px / 1.08 'Cormorant Garamond', serif;
}

.halloween-popup__heading h2 span {
    color: #f24405;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
}

.halloween-popup__intro {
    margin: 0;
    color: #000;
    font: 500 12px / 15.5px 'Plus Jakarta Sans', sans-serif;
}

.halloween-popup__form {
    display: grid;
    gap: 13px;
}

.halloween-popup__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.halloween-popup__fields .form-group {
    min-width: 0;
    margin: 0;
}

.halloween-popup .halloween-popup__input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid #c7c7c7;
    border-radius: 10px;
    background: #eedad4;
    box-shadow: none;
    color: #202020;
    font: 500 10px / 1.4 'Plus Jakarta Sans', sans-serif;
}

.halloween-popup .halloween-popup__input::placeholder {
    color: #737373;
    font-size: 10px;
    font-weight: 400;
    opacity: 1;
}

.halloween-popup .halloween-popup__input.halloween-popup__invalid,
.halloween-popup form .halloween-popup__input[aria-invalid="true"] {
    border: 1px solid #b65137 !important;
    background-image: none !important;
    box-shadow: 0 0 0 1px rgba(182, 81, 55, .18) !important;
}

.halloween-popup .halloween-popup__input.halloween-popup__invalid:focus {
    border-color: #9f402a !important;
    box-shadow: 0 0 0 2px rgba(182, 81, 55, .16) !important;
}

.halloween-popup .halloween-popup__input:focus {
    border-color: #f24405;
    /* Preserve the select's single-arrow image, position, and no-repeat setting. */
    background-color: #eedad4;
    box-shadow: 0 0 0 2px rgba(242, 68, 5, .15);
    color: #202020;
}

.halloween-popup .halloween-popup__select {
    padding-right: 24px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23737373' stroke-width='1.2'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.halloween-popup form .halloween-popup__select[aria-invalid="true"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23737373' stroke-width='1.2'/%3E%3C/svg%3E") !important;
}

.halloween-popup__message {
    grid-column: 1 / -1;
}

.halloween-popup .halloween-popup__message textarea {
    height: 68px;
    min-height: 68px;
    max-height: 120px;
    padding-top: 11px;
    resize: vertical;
}

.halloween-popup .halloween-popup__consent {
    box-sizing: border-box;
    width: 100%;
    min-height: 95px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #000;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}

.halloween-popup .halloween-popup__consent--invalid {
    border-color: #b65137;
}

.halloween-popup .halloween-popup__consent .sms-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    color: #000;
    font: 500 9px / 12.5px 'Plus Jakarta Sans', sans-serif;
}

.halloween-popup form .halloween-popup__consent input.sms-consent__checkbox[type="checkbox"] {
    flex: 0 0 auto;
    width: 8px !important;
    height: 8px !important;
    min-height: 8px !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    accent-color: #f24405;
}

.halloween-popup__submit {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 10px 16px;
    border: 0;
    border-radius: 40px;
    background: #f24405;
    color: #fff;
    cursor: pointer;
    font: 700 12px / 20px 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 1.2px;
    text-align: center;
}

.halloween-popup__submit:hover {
    background: #d83c04;
}

.halloween-popup__validation {
    margin: -7px 0 0;
    color: #963b25;
    font: 600 9px / 12px 'Plus Jakarta Sans', sans-serif;
    text-align: center;
}

.halloween-popup__validation[hidden] {
    display: none;
}

.halloween-popup form input.sms-consent__checkbox[aria-invalid="true"] {
    border-color: #b65137 !important;
    box-shadow: none !important;
}

/* Match the former popup's 1100px desktop footprint while keeping the
   Halloween artwork and form in the same proportions. */
@media (min-width: 1100px) {
    .halloween-popup .modal-dialog {
        max-width: 1100px;
    }

    .halloween-popup__scene {
        height: 716px;
        padding: 20px 32px;
    }

    .halloween-popup__panel {
        width: 518px;
        height: 676px;
        max-height: calc(100dvh - 64px);
        padding: 55px 27px 22px;
    }

    .halloween-popup__close {
        top: 17px;
        right: 16px;
        transform: scale(1.3);
    }

    .halloween-popup__heading {
        margin: 0 13px 13px;
    }

    .halloween-popup__eyebrow {
        margin-bottom: 13px;
        font-size: 13px;
        line-height: 20px;
    }

    .halloween-popup__heading h2 {
        margin-bottom: 12px;
        font-size: 29px;
    }

    .halloween-popup__intro {
        font-size: 15px;
        line-height: 20px;
    }

    .halloween-popup__form {
        gap: 17px;
    }

    .halloween-popup__fields {
        gap: 11px;
    }

    .halloween-popup .halloween-popup__input {
        height: 48px;
        min-height: 48px;
        padding-right: 24px;
        padding-left: 24px;
        font-size: 13px;
    }

    .halloween-popup .halloween-popup__input::placeholder {
        font-size: 13px;
    }

    .halloween-popup .halloween-popup__select {
        padding-right: 32px;
        background-position: right 16px center;
    }

    .halloween-popup .halloween-popup__message textarea {
        height: 90px;
        min-height: 90px;
        padding-top: 15px;
    }

    .halloween-popup .halloween-popup__consent {
        min-height: 125px;
        padding: 13px 17px;
    }

    .halloween-popup .halloween-popup__consent .sms-consent__label {
        gap: 9px;
        font-size: 12px;
        line-height: 16px;
    }

    .halloween-popup form .halloween-popup__consent input.sms-consent__checkbox[type="checkbox"] {
        width: 11px !important;
        height: 11px !important;
        min-height: 11px !important;
        margin-top: 4px !important;
    }

    .halloween-popup__submit {
        min-height: 53px;
        padding: 13px 20px;
        font-size: 15px;
        line-height: 27px;
    }

    .halloween-popup__validation {
        font-size: 11px;
        line-height: 15px;
    }
}

@media (min-width: 768px) {
    .halloween-popup__panel {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .halloween-popup__heading {
        flex: none;
    }

    .halloween-popup__form {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: 8px;
        scrollbar-gutter: stable;
        scrollbar-color: #d9a991 transparent;
        scrollbar-width: thin;
    }

    .halloween-popup__form::-webkit-scrollbar {
        width: 6px;
    }

    .halloween-popup__form::-webkit-scrollbar-thumb {
        border-radius: 6px;
        background: #d9a991;
    }
}

@media (max-width: 767px) {
    .halloween-popup .modal-dialog {
        width: calc(100% - 24px);
    }

    .halloween-popup__scene {
        height: auto;
        max-height: none;
        padding: 0;
        background: transparent;
    }

    .halloween-popup__panel {
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 24px);
        padding: 42px 20px 24px;
        border-radius: 20px;
    }

    .halloween-popup .halloween-popup__consent .sms-consent__label {
        font-size: 9px;
        line-height: 1.4;
    }

    .halloween-popup form .halloween-popup__consent input.sms-consent__checkbox[type="checkbox"] {
        width: 15px !important;
        height: 15px !important;
        min-height: 15px !important;
        margin-top: 1px !important;
    }
}

@media (max-width: 420px) {
    .halloween-popup__heading {
        margin-right: 0;
        margin-left: 0;
    }

    .halloween-popup__heading h2 {
        font-size: 20px;
    }

    .halloween-popup__fields {
        grid-template-columns: 1fr;
    }

    .halloween-popup__message {
        grid-column: 1;
    }
}
