/* Popup component styles */
/* Base hidden state */
.popup {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    font-family: inherit;
}

.popup.is-open {
    display: block;
}

/* Overlay */
.popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
    opacity: 0;
    transition: opacity .35s ease;
}

.popup.is-open .popup__overlay {
    opacity: 1;
}

/* Content wrapper */
.popup__content {
    position: relative;
    max-width: 1490px;
    width: calc(100% - 40px);
    margin: 60px auto;
    background: #fff;
    padding: 72px 60px;
    /* box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .25); */
    display: flex;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .45s ease, transform .45s ease;
}

.popup.is-open .popup__content {
    opacity: 1;
    transform: translateY(0);
}

/* Inner layout: text left, image right */
.popup__inner {
    display: flex;
    gap: 40px;
    width: 100%;
    align-items: stretch;
}

.popup__image {
    flex: 0 0 38%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: absolute;
    bottom: 0;
    right: 0;
}

.popup__image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.popup__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.popup__discount {
    font-size: clamp(2rem, 0.8125rem + 3.9583vw, 4.375rem);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 28px;
}

.popup__title {
    font-size: 40px;
    margin: 0 0 8px;
    font-weight: 600;
    max-width: 475px;
}

.popup__description {
    margin: 0 0 35px !important;
    line-height: 1.5;
}

.popup__form {
    margin-top: auto;
    max-width: 420px;
}

/* Typical form overrides – adapt to actual form plugin classes */
.popup__form input[type="text"],
.popup__form input[type="email"],
.popup__form input[type="tel"],
.popup__form input[type="password"],
.popup__form textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #B0B0B0;
    padding: 12px 0 10px;
    margin-bottom: 0;
    background: transparent;
    font-size: 15px;
    line-height: 1.3;
    outline: none;
    transition: border-color .25s ease;
}

.popup__form input:focus,
.popup__form textarea:focus {
    border-color: #005bbb;
}

.popup__form button,
.popup__form input[type="submit"] {
    appearance: none;
    cursor: pointer;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    font-size: 13px;
    letter-spacing: .5px;
    font-weight: 600;
    padding: 14px 38px;
    text-transform: uppercase;
    transition: background .25s ease, color .25s ease;
}

.popup__form button:hover,
.popup__form input[type="submit"]:hover {
    background: #1a1a1a;
    color: #fff;
}

/* Close button */
.popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent url('../img/close.svg') center/18px 18px no-repeat;
    cursor: pointer;
    font-size: 0;
    line-height: 1;
    opacity: .75;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 10;
}

.popup__close:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Scroll lock helper when popup open */
body.popup-open {
    overflow: hidden;
    padding-right: var(--scrollbar-compensation, 0);
}

/* Responsive */
@media (min-width: 1440px) {
    .popup__description {
        font-size: 26px;
    }
}

@media (max-width: 1440px) {
    .popup__description {
        font-size: 21px;
    }
}

@media (max-width: 1100px) {
    .popup__content {
        padding: 50px 55px;
    }

    .popup__discount {
        font-size: 42px;
    }

    .popup__title {
        font-size: 24px;
    }
}

@media (max-width: 880px) {
    .popup__inner {
        flex-direction: column-reverse;
    }

    .popup__image {
        display: none;
    }

    .popup__form {
        max-width: 100%;
    }

    .popup__content {
        padding: 50px 45px 55px;
    }
}

@media (max-width: 640px) {
    .popup__content {
        margin: 30px auto;
        padding: 42px 28px 48px;
    }

    .popup__discount {
        font-size: 38px;
        margin-bottom: 20px;
    }

    .popup__title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .popup__description {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .popup__form button,
    .popup__form input[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .popup__discount {
        font-size: 34px;
    }

    .popup__title {
        font-size: 20px;
    }

    .popup__content {
        padding: 38px 22px 44px;
    }
}

/* Accessibility preference: reduce motion */
@media (prefers-reduced-motion: reduce) {

    .popup__content,
    .popup__overlay {
        transition: none;
    }
}