/* Модальное окно рассрочки */
.installment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10020;
    align-items: center;
    justify-content: center;
}

.installment-modal.active {
    display: flex;
}

.installment-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.installment-modal__content {
    position: relative;
    background-color: #FFFFFF;
    border-radius: 14px;
    padding: 40px;
    max-width: 856px;
    width: 100%;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10021;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.installment-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.3s ease;
    z-index: 10022;
}

.installment-modal__close:hover {
    opacity: 0.7;
}

.installment-modal__close svg {
    width: 24px;
    height: 24px;
}

.installment-modal__title {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1.2;
    color: #353535;
    margin: 0 0 16px 0;
    padding-right: 40px;
}

.installment-modal__subtitle {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.5;
    color: #1F31EF;
    margin: 0 0 9px 0;
}

.installment-modal__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.installment-modal__paragraph {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #353535;
    margin: 0;
}

.installment-modal__button {
    width: 100%;
    height: 56px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.18;
    text-transform: uppercase;
    color: #FFFFFF;
    background-color: #ED1E79;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.installment-modal__button:hover {
    background-color: #D01A6B;
    filter: brightness(0.95);
}

.installment-modal__button:active {
    transform: scale(0.98);
}

/* Форма для рассрочки */
.installment-form-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10030;
    align-items: center;
    justify-content: center;
}

.installment-form-modal.active {
    display: flex;
}

.installment-form-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.installment-form-modal__content {
    position: relative;
    background-color: #FFFFFF;
    border-radius: 14px;
    padding: 32px;
    max-width: 856px;
    width: 100%;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10031;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.installment-form-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.3s ease;
    z-index: 10032;
}

.installment-form-modal__close:hover {
    opacity: 0.7;
}

.installment-form-modal__close svg {
    width: 24px;
    height: 24px;
}

.installment-form-modal__title {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1.2;
    color: #353535;
    margin: 0 0 16px 0;
    padding-right: 40px;
}

.installment-form-modal__description {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #696464;
    margin: 0 0 16px 0;
}

.installment-form-modal__delivery-text {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.5;
    color: #1F31EF;
    margin: 0 0 32px 0;
}

.installment-form-modal__highlight {
    color: #1F31EF;
}

.installment-form-modal__form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.installment-form-modal__form-group {
    width: 100%;
}

.installment-form-modal__input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #353535;
    background-color: #FFFFFF;
    border: 1px solid #353535;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease;
}

.installment-form-modal__input::placeholder {
    color: #696464;
}

.installment-form-modal__input:focus {
    border-color: #ED1E79;
}

.installment-form-modal__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.installment-form-modal__checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.installment-form-modal__checkbox-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-color: #ED1E79;
    border-radius: 4px;
    position: relative;
    transition: background-color 0.3s ease;
    margin-top: 2px;
}

.installment-form-modal__checkbox-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5L5 9L13 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
}

.installment-form-modal__checkbox-input:not(:checked) + .installment-form-modal__checkbox-icon {
    background-color: transparent;
    border: 1px solid #353535;
}

.installment-form-modal__checkbox-input:not(:checked) + .installment-form-modal__checkbox-icon::after {
    opacity: 0;
}

.installment-form-modal__checkbox-text {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: #696464;
    flex: 1;
}

.installment-form-modal__privacy-link {
    color: #1F31EF;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.installment-form-modal__privacy-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.installment-form-modal__submit {
    width: 100%;
    height: 56px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.18;
    text-transform: uppercase;
    color: #FFFFFF;
    background-color: #ED1E79;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 14px;
}

.installment-form-modal__submit:hover {
    background-color: #D01A6B;
    filter: brightness(0.95);
}

.installment-form-modal__submit:active {
    transform: scale(0.98);
}

/* Адаптивность */
@media screen and (max-width: 767px) {
    .installment-modal__content,
    .installment-form-modal__content {
        padding: 32px 24px;
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .installment-modal__title,
    .installment-form-modal__title {
        font-size: 24px;
        padding-right: 32px;
    }
    
    .installment-modal__subtitle,
    .installment-form-modal__description {
        font-size: 14px;
    }
    
    .installment-modal__paragraph {
        font-size: 14px;
    }
    
    .installment-form-modal__form {
        gap: 16px;
    }
    
    .installment-form-modal__input {
        height: 48px;
        font-size: 14px;
    }
    
    .installment-modal__button,
    .installment-form-modal__submit {
        height: 52px;
        font-size: 14px;
    }
    
    .installment-modal__close,
    .installment-form-modal__close {
        top: 16px;
        right: 16px;
        width: 28px;
        height: 28px;
    }
    
    .installment-modal__close svg,
    .installment-form-modal__close svg {
        width: 20px;
        height: 20px;
    }
}

