</div>
</div>
</div> <button class="benefit__button" id="popupSubscribeButton">Start using</button>
<!-- Subscription Application-->
<div class="popup-subscribe" id="popupSubscribe">
<div class="popup-subscribe__curtain" id="popupSubscribeCurtain"></div>
<div class="popup-subscribe__wrapper" id="popupSubscribeWrapper">
<div class="popup-subscribe__inner">
<div class="popup-subscribe__block">
<div class="popup-subscribe__title">Subscription Application</div>
<div class="popup-subscribe__close" id="popupSubscribeClose">
<img class="popup-subscribe__svg" src="home/image/close.svg" alt="close">
<img class="popup-subscribe__svg-tablet" src="home/image/close-tablet.svg" alt="close">
</div>
</div>
<form class="popup-subscribe__form">
<div class="popup-subscribe__box popup-subscribe__box-name">
<label class="popup-subscribe__label" for="popup-subscribe__name">Enter your name</label>
<input class="popup-subscribe__input" id="popup-subscribe__name" type="text" name="Name" placeholder="Anastasiia" required>
<span class="popup-subscribe__span"></span>
</div>
<div class="popup-subscribe__box">
<label class="popup-subscribe__label" for="popup-subscribe__mail">E-mail</label>
<input class="popup-subscribe__input" id="popup-subscribe__mail" type="email" name="E-mail" placeholder="Enter your e-mail" required>
<span class="popup-subscribe__span"></span>
</div>
<div class="popup-subscribe__box popup-subscribe__box_last">
<label class="popup-subscribe__label" for="popup-subscribe__phone">Phone</label>
<input class="popup-subscribe__input" id="popup-subscribe__phone" type="tel" name="Phone" placeholder="Enter your phone" required>
<span class="popup-subscribe__span"></span>
</div>
</form>
<button class="popup-subscribe__button" id="popupSubscribeButtonApply">Apply</button>
</div>
</div>
<!-- Purchase payment-->
<div class="popup-payment__wrapper" id=popupPaymentWrapper">
<div class="popup-payment__inner">
<div class="popup-payment__block popup-subscribe__block">
<div class="popup-payment__title popup-subscribe__title">Purchase payment</div>
<div class="popup-payment__close popup-subscribe__close">
<img class="popup-subscribe__svg" src="home/image/close.svg" alt="close">
<img class="popup-subscribe__svg-tablet" src="home/image/close-tablet.svg" alt="close">
</div>
</div>
<div class="popup-payment__services">
<div class="popup-payment__apple">
<img src="home/image/apple.svg" alt="apple">
</div>
<div class="popup-payment__google">
<img src="home/image/google.svg" alt="google">
</div>
</div>
<div class="popup-payment__card">
<div class="popup-payment__box">
<label class="popup-payment__label popup-subscribe__label" for="popup-payment__name">Card Number</label>
<input class="popup-payment__input popup-subscribe__input" id="popup-payment__name" type="number" name="Card Number" placeholder="1234 1234 1234 1234" required>
<span class="popup-payment__span popup-subscribe__span"></span>
</div>
<div class="popup-payment__wrapper-form">
<div class="popup-payment__box popup-payment__box-form">
<label class="popup-payment__label popup-subscribe__label" for="popup-payment__date">Expiration Date</label>
<input class="popup-payment__input popup-subscribe__input" id="popup-payment__date" type="number" name="Expiration Date" placeholder="MM/ГГ" required>
<span class="popup-payment__span popup-subscribe__span"></span>
</div>
<div class="popup-payment__box popup-payment__box-form">
<label class="popup-payment__label popup-subscribe__label" for="popup-payment__cvc">СVC</label>
<input class="popup-payment__input popup-subscribe__input" id="popup-payment__cvc" type="number" name="СVC" placeholder="СVC" required>
<span class="popup-payment__span popup-subscribe__span"></span>
</div>
</div>
<button class="popup-payment__button popup-payment__button-card popup-subscribe__button">Pay with card</button>
<div class="popup-payment__privacy">We do not collect information on your cards, everything is safe</div>
</div>
<div class="popup-payment__wallet">
<div class="popup-payment__subtitle">Payment by crypto wallet</div>
<div class="popup-payment__box popup-payment__box-wallet">
<label class="popup-payment__label-wallet" for="popup-payment__crypto">Select currency</label>
<input class="popup-payment__input-wallet" id="popup-payment__crypto" type="text" name="Currency" placeholder="Bitcoin" required>
</div>
<button class="popup-payment__button popup-subscribe__button">Pay</button>
</div>
</div>
</div>
</div>
.benefit__button {
display: flex;
justify-content: center;
align-items: center;
max-width: 207px;
width: 100%;
min-height: 54px;
border-radius: 16px;
background: #FFFFFF;
font-family: "Gotham Pro Bold", sans-serif;
font-style: normal;
font-weight: 700;
font-size: 17px;
line-height: 130%;
color: #171717;
transition: all ease-in-out 0.5s;
}
.popup-subscribe {
max-width: 0;
max-height: 0;
overflow: hidden;
}
.popup-subscribe.active {
max-width: 100%;
max-height: 100%;
transition: all ease-in 0.8s;
}
.popup-subscribe.active .popup-subscribe__curtain {
max-width: 100%;
max-height: 100%;
}
.popup-subscribe__wrapper.active {
left: 0;
}
.popup-subscribe__curtain,
.popup-payment__curtain {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #e5e5e594;
z-index: 3;
cursor: pointer;
max-width: 0;
max-height: 0;
overflow: hidden;
}
.popup-subscribe__wrapper {
max-width: 540px;
max-height: 581px;
}
.popup-subscribe__wrapper,
.popup-payment__wrapper {
width: 100%;
box-sizing: border-box;
box-shadow: 0 4px 24px rgba(213, 216, 221, 0.2);
border-radius: 32px;
background-color: #FFFFFF;
padding: 40px 0 40px 0;
position: fixed;
top: 13%;
right: 0;
bottom: 0;
left: 200%;
margin: 0 auto;
z-index: 4;
transition: left ease-in-out 0.8s;
}
.popup-subscribe__inner {
max-width: 460px;
width: 100%;
margin: 0 auto;
}
.popup-subscribe__block {
max-width: 460px;
width: 100%;
margin-bottom: 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
.popup-subscribe__title {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 26px;
line-height: 140%;
color: #171717;
}
.popup-subscribe__close {
display: flex;
justify-content: center;
align-items: center;
width: 28px;
height: 28px;
background: rgba(23, 23, 23, 0.1);
border-radius: 100px;
cursor: pointer;
}
.popup-subscribe__svg-tablet {
display: none;
}
.popup-subscribe__form,
.popup-subscribe__box {
max-width: 460px;
width: 100%;
margin: 0 auto 32px;
position: relative;
}
.popup-subscribe__box_last {
margin: 0;
}
.popup-subscribe__label,
.popup-payment__label-wallet {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 130%;
color: #171717;
display: inline-block;
margin-bottom: 9px;
}
.popup-subscribe__input,
.popup-payment__input-wallet {
max-width: 460px;
width: 100%;
background: #F1F4F8;
border-radius: 12px;
box-sizing: border-box;
padding: 16px 0 16px 24px;
border: 2px solid transparent;
transition: all ease-in-out 0.3s;
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 130%;
color: #070033;
}
.popup-subscribe__input::input-placeholder {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 130%;
color: #8F8F8F;
}
.popup-subscribe__input:input-placeholder {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 130%;
color: #8F8F8F;
}
.popup-subscribe__input::input-placeholder {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 130%;
color: #8F8F8F;
}
.popup-subscribe__input::placeholder {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 130%;
color: #8F8F8F;
}
.popup-subscribe__input:hover {
border: 2px solid #838099;
}
.popup-subscribe__input:focus {
border: 2px solid #CECBDF;
outline: none;
}
.popup-subscribe__input:valid {
border: 2px solid #1749B3;
}
.popup-subscribe__input:active {
border: 2px solid #CECBDF;
outline: none;
}
.popup-subscribe__span::after {
position: absolute;
top: 50px;
right: 17px;
transition: all ease-in 0.3s;
transform: scale(0);
}
.popup-subscribe__input:valid + .popup-subscribe__span::after {
content: "+";
transform: scale(1);
}
.popup-subscribe__input:valid:not(:focus) {
border: transparent;
}
.popup-subscribe__input:valid:not(:focus) + .popup-subscribe__span::after {
content: "+";
}
.popup-subscribe__button {
display: flex;
justify-content: center;
align-items: center;
background-color: #1749B3;
max-width: 460px;
width: 100%;
min-height: 54px;
box-sizing: border-box;
border-radius: 12px;
margin: 0 auto;
font-family: "Gotham Pro Bold", sans-serif;
font-style: normal;
font-weight: 700;
font-size: 18px;
line-height: 130%;
color: #FFFFFF;
transition: all ease-in-out 0.5s;
}
.popup-subscribe__button:hover {
background-color: transparent;
border: 1px solid #1749B3;
color: #171717;
}
.popup-subscribe__button:active {
background-color: #4B84FD;
border: none;
color: #FFFFFF;
}
.popup-payment__wrapper {
max-width: 580px;
max-height: 869px;
top: 4%;
transform: scale(0);
}
.popup-payment__wrapper.active {
left: 0;
transform: scale(1);
}
.popup-payment__inner {
max-width: 500px;
width: 100%;
margin: 0 auto;
}
.popup-payment__block {
max-width: 500px;
margin-bottom: 33px;
}
.popup-payment__close {
width: 40px;
height: 40px;
}
.popup-payment__services {
max-width: 500px;
width: 100%;
margin: 0 auto 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
.popup-payment__apple,
.popup-payment__google {
display: flex;
justify-content: center;
align-items: center;
background-color: black;
max-width: 240px;
width: 100%;
min-height: 54px;
border-radius: 4px;
}
.popup-payment__card,
.popup-payment__box,
.popup-payment__wallet {
max-width: 500px;
width: 100%;
margin: 0 auto;
}
.popup-payment__card {
margin-bottom: 40px;
}
.popup-payment__box {
margin-bottom: 32px;
}
.popup-payment__label,
.popup-payment__label-wallet {
font-size: 15px;
margin-bottom: 12px;
}
.popup-payment__input {
max-width: 500px;
}
.popup-payment__wrapper-form {
display: box;
display: flexbox;
display: flex;
justify-content: space-between;
align-items: center;
max-width: 500px;
width: 100%;
margin-bottom: 40px;
}
.popup-payment__box-form {
max-width: 240px;
width: 100%;
margin: 0;
}
.popup-payment__button {
max-width: 500px;
}
.popup-payment__button-card {
margin-bottom: 12px;
}
.popup-payment__privacy {
font-family: "Gotham Pro Regular", sans-serif;
font-style: normal;
font-weight: 400;
font-size: 15px;
line-height: 130%;
color: #7F7F7F;
}
.popup-payment__subtitle {
font-family: "Gotham Pro Bold", sans-serif;
font-style: normal;
font-weight: 700;
font-size: 20px;
line-height: 140%;
color: #171717;
margin-bottom: 32px;
}
.popup-payment__input-wallet {
max-width: 500px;
}
.popup-payment__box-wallet {
position: relative;
}
.popup-payment__box-wallet::after {
content: "+";
display: flex;
justify-content: center;
align-items: center;
background: #FFFFFF;
border-radius: 8px;
width: 32px;
height: 32px;
position: absolute;
top: 45px;
right: 27px;
cursor: pointer;
}
const popupSubscribe = document.querySelector('#popupSubscribe');
const popupSubscribeCurtain = document.querySelector('#popupSubscribeCurtain');
const popupSubscribeWrapper = document.querySelector('#popupSubscribeWrapper');
const popupPaymentWrapper = document.querySelector('#popupPaymentWrapper');
const popupSubscribeButton = document.querySelector('#popupSubscribeButton');
const popupSubscribeButtonApply = document.querySelector('#popupSubscribeButtonApply');
const popupSubscribeClose = document.querySelector('#popupSubscribeClose');
popupSubscribeButton.addEventListener('click',function () {
popupSubscribe.classList.add('active')
popupSubscribeWrapper.classList.add('active')
body.classList.add('noscroll')
});
popupSubscribeClose.addEventListener('click',function () {
popupSubscribe.classList.remove('active')
popupSubscribeWrapper.classList.remove('active')
body.classList.remove('noscroll')
});
popupSubscribeCurtain.addEventListener('click',function () {
popupSubscribe.classList.remove('active')
popupSubscribeWrapper.classList.remove('active')
body.classList.remove('noscroll')
});
popupSubscribeButtonApply.addEventListener('click',function () {
popupSubscribeWrapper.classList.remove('active')
popupPaymentWrapper.classList.add('active')
});
const body = document.body;
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.