/* ===============================
   SIMPLE INSTALLMENT FRONT STYLE
   =============================== */

/* Блок рассрочки */
.sic-inline {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    background: #fff;
    margin-top: 10px;
    font-family: 'Lora', serif;
    max-width: 560px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Заголовок блока */
.sic-inline-title {
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 10px;
}

/* Список сроков */
.sic-inline-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Один срок */
.sic-term-inline {
    display: inline-flex;
    align-items: center;
}

.sic-term-inline input[type="radio"] {
    display: none;
}

/* Кнопка выбора срока */
.sic-term-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Галочка */
.sic-term-text::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #cbd5e1;
    color: transparent;
    font-size: 12px;
    box-sizing: border-box;
}

/* Активный срок */
.sic-term-inline input[type="radio"]:checked + .sic-term-text {
    border-color: #16a34a;
    background: #ecfdf3;
    color: #166534;
}

.sic-term-inline input[type="radio"]:checked + .sic-term-text::before {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

/* Кнопка "Отправить заявку" */
.sic-submit-wrapper {
    text-align: right;
    margin-top: 14px;
}

.sic-open-popup-button {
    background-color: #f97316;
    border: none;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.sic-open-popup-button:hover {
    background-color: #ea580c;
}

/* ===============================
   POPUP FORM STYLE
   =============================== */

.sic-overlay {
    position: fixed;
    z-index: 9997;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    display: none;
}

.sic-modal {
    position: fixed;
    z-index: 9998;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    width: 90%;
    max-width: 420px;
    padding: 24px;
    display: none;
}

/* Закрыть попап */
.sic-modal-close {
    position: absolute;
    right: 14px;
    top: 10px;
    background: #ecfdf3;
    color: #166534;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    cursor: pointer;
}

.sic-modal-close:hover {
    background: #16a34a;
    color: #ffffff;
}

/* Поля формы */
.sic-fields {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sic-fields label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.sic-fields input[type="text"],
.sic-fields input[type="tel"],
.sic-fields input[type="email"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    box-sizing: border-box;
}

/* Кнопка отправки формы */
.sic-submit-button {
    margin-top: 14px;
    background-color: #16a34a;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.sic-submit-button:hover {
    background-color: #15803d;
}

/* Сообщение после отправки */
.sic-request-message {
    margin-top: 10px;
    font-size: 14px;
}

/* ===============================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ
   =============================== */
@media (max-width: 767px) {
    .sic-inline-terms {
        flex-direction: column;
    }

    .sic-term-text {
        width: 100%;
        justify-content: flex-start;
    }

    .sic-submit-wrapper {
        text-align: center;
    }

    .sic-open-popup-button {
        width: 100%;
    }

    .sic-modal {
        width: 94%;
        max-width: 360px;
    }
}
/* --- Повышаем приоритет кнопки рассрочки --- */
.sic-inline .sic-open-popup-button,
.sic-inline .sic-open-popup-button.button,
button.sic-open-popup-button {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
    text-align: left;
    float: left;
}

.sic-inline .sic-open-popup-button:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.4);
    transform: translateY(-1px);
}
