/* NEW */
.popup {
	padding: 14px 14px 20px;

	height: 320px;

	display: none;

	background-color: #fff;
}

#modalCredit {
	background-color: #fff;
	background-image: url(../img/modal-credit_mob.webp);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: top center;
}

#modalRequest {
	background-color: #fff;
	background-image: url(../img/modal-req_mob.webp);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: top center;
}

#modalTradeIn {
	background-color: #fff;
	background-image: url(../img/modal-trade_mob.webp);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: top center;
}

.popup--form {
	width: 337px;
	/* width: 328px; */
	height: auto;
}

@media (max-width: 1024px) {
	.popup--form .popup__cont {
		height: auto;
		min-height: 0;
	}

	.is-compact .fancybox__content:has(.popup) {
		max-height: 90vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media (max-width: 768px) {
	.popup--form {
		padding: 18px;
		padding-top: 169px;
	}

	.popup--form .popup__input {
		text-align: center;
		padding-left: 16px;
		padding-right: 16px;
	}
}

#modal-success,
#modal-error {
	background-color: #fff;
	background-image: url(../img/modal-suc_mob.webp);
	background-repeat: no-repeat;
	background-size: cover;
}

.popup__cont-wrapper {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: 1fr;
}

.popup__cont {
	display: flex;
	flex-direction: column;
	justify-content: space-between;

	height: 100%;
	gap: 12px;
}

#modal-success .popup__cont,
#modal-error .popup__cont {
	align-items: flex-end;
}

#modal-success .popup__head,
#modal-error .popup__head {
	font-weight: 700;
	color: var(--color-white);
}

.popup__head {
	display: block;

	font-size: 24px;
	line-height: 1;
	font-weight: 700;
	color: #34343d;
}

.popup__head span {
	color: #6D8AA9;
}

.popup__list {
	list-style: disc;

	margin-top: 10px;
	padding-left: 15px;
	gap: 8px;
	display: flex;
	flex-direction: column;
}

.popup__list.mob_hide {
	display: none;
}

.popup__list-item {
	font-size: 14px;
	line-height: 1;
	font-weight: 400;
	color: #34343d;
}

.popup__list-item::marker {
	color: #6D8AA9;
}

.popup__input {
	height: 40px;
	border: 1px solid #6c6f78;
	border-radius: 0;
}

.popup__form-cont {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.popup__form {
	width: 100%;
	position: relative;
}

.popup__button {
    background-color: #ffffff !important;
    color: #34343d !important;
    border: 2px solid #34343d !important;
    transition: all 0.3s ease !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    font-weight: 700;
}

/* 2. Активное состояние (ВСЁ заполнено) — СВЕТЛО-ГОЛУБАЯ */
.popup__button.popup__button--active {
    background-color: #7D9AB8 !important;
    color: #34343d !important;
    border: 2px solid #7D9AB8 !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

/* 3. Эффект при наведении на активную (светло-голубую) кнопку */
.popup__button.popup__button--active:hover {
    background-color: #6D8AA9 !important;
    border-color: #6D8AA9 !important;
    color: #34343d !important;
    transform: scale(1.02);
    box-shadow: 0px 4px 15px 0px rgba(125, 154, 184, 0.4);
}

@media (min-width: 1025px) {
	/* NEW */
    .popup {
        width: 887px;
        height: 544px;
        padding: 31px 40px 31px 40px;
    }

    #modalCredit {
        height: 506px;
    }

    #modalCredit {
        background: url(../img/modal-credit_desk.webp) no-repeat;
        background-size: cover;
    }

    .popup__cont {
        width: 411px;
        margin-left: auto;
    }

    #modalRequest {
        background: url(../img/modal-req_desk.webp) no-repeat;
        background-size: cover;
    }

    #modalTradeIn {
        background: url(../img/modal-trade_desk.webp) no-repeat;
        background-size: cover;
    }

    #modal-success {
        background: url(../img/modal-suc_desk.webp) no-repeat;
        background-size: cover;
    }

    #modal-error {
        background: url(../img/modal-suc_desk.webp) no-repeat;
        background-size: cover;
    }

    #modal-success,
    #modal-error {
        width: 600px;
        height: 400px;
        border-radius: 9px;
        padding: 18px 20px 20px;
    }

    #modal-success .popup__cont,
    #modal-error .popup__cont {
        width: auto;
        margin-left: 0;
    }

    #modal-success .popup__head,
    #modal-error .popup__head {
        font-weight: 700;
        color: var(--color-white);
    }

    .popup__head {
        font-size: 32px;
        line-height: 34px;
    }

    .popup__list {
        margin-top: 20px;
    }

    .popup__list.mob_hide {
        display: block;
    }

    .popup__list-item {
        font-size: 16px;
        line-height: 1;
    }

    .popup__form {
        width: 407px;
    }

    .popup__form-cont {
        flex-direction: row;
        gap: 10px;
    }

    .popup__input {
        height: 48px;
        padding-left: 24px;
    }

    .popup__button {
        height: 48px;
    }

    .popup .form__checkbox-text {
        font-size: 16px;
        line-height: 1.2;
    }

    .popup .agreement__text,
    .popup .agreement .form__checkbox-text {
        font-size: 12px;
    }
    .is-compact .fancybox__content > .carousel__button.is-close,
    .fancybox__content > .carousel__button.is-close {
        top: 0;
        right: -40px;
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.4);
    }

    .fancybox__content > .carousel__button.is-close svg {
        width: 10px;
        height: 10px;
        opacity: 1;
        stroke: #000;
        fill: none;
        stroke-width: 2px;
    }

    .popup__form-guard-banner-text {
        font-size: 16px;
    }
    /**************************/
}

@media (max-width: 768px) {
	.popup__button {
        font-size: 14px;
        height: 42px;
    }

    .is-compact .fancybox__content > .carousel__button.is-close,
    .fancybox__content > .carousel__button.is-close {
        width: 32px;
        height: 32px;
        border: none;
        background: white;
        border-radius: 50%;
        top: unset;
        bottom: -46px;
        right: 50%;
        transform: translateX(50%);
    }

    .fancybox__content > .carousel__button.is-close svg {
        width: 10px;
        height: 10px;
        opacity: 1;
        stroke: #000;
        fill: none;
        stroke-width: 2px;
    }
}

