Skip to main content

Оформление виджета

image.png

Оформление виджета

/* === СТИЛИ ДЛЯ ОФФЕРОВ ВО ВСЕХ ФОРМАХ GC === */

.lt-form .form-position {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 14px 16px;
  margin-bottom: 12px;

  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;

  cursor: pointer;

  transition: 0.18s ease border-color,
              0.18s ease background-color,
              0.15s ease box-shadow;
}

/* hover */
.lt-form .form-position:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* выбранный оффер (.selected GetCourse добавляет сам) */
.lt-form .form-position.selected {
  background: #eef6ff;
  border-color: #3b82f6;
  box-shadow: 0 6px 16px rgba(59,130,246,0.15);
}

/* Радиокнопка слева */
.lt-form .form-position-checker {
  flex-shrink: 0;
}

.lt-form .form-position-checker input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
  cursor: pointer;
}

/* Заголовок оффера по центру */
.lt-form .form-position-title {
  flex-grow: 1;
}

.lt-form .form-position-title .offer-title {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  line-height: 1.3;
}

/* Блок цены справа */
.lt-form .form-position-price {
  flex-shrink: 0;
  text-align: right;
  min-width: 70px;
}

.lt-form .form-position-price__discount {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: line-through;
  display: block;
  line-height: 1.2;
}

.lt-form .final-price {
  font-weight: 700;
  color: #111827;
  font-size: 14px;
}


/* === ПОЛЯ ВВОДА ВО ВСЕХ ФОРМАХ GC === */

.lt-form .f-input,
.lt-form input[type="text"],
.lt-form input[type="email"],
.lt-form input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;

  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 10px;

  font-size: 15px;
  color: #111827;

  transition: 0.18s border-color,
              0.18s box-shadow,
              0.18s background-color;
}

/* отступы между полями (если используется builder) */
.lt-form .builder-item.part-userField {
  margin-bottom: 14px;
}

.lt-form .f-input::placeholder,
.lt-form input::placeholder {
  color: #9ca3af;
}

/* фокус */
.lt-form .f-input:focus,
.lt-form input[type="text"]:focus,
.lt-form input[type="email"]:focus,
.lt-form input[type="tel"]:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
  outline: none;
}

/* ошибка */
.lt-form .f-input.error,
.lt-form .has-error .f-input {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.25);
}

 

Скрипт перехода к кастомной ссылке при выборе определенного оффера
$(function() {

    $('.btn.f-btn.button-md.btn-success').on('click', function() {

        var freeOfferSelected = $('.form-position-input[data-price-value="0"]').is(':checked');

        if (freeOfferSelected) {
            // ЗАДЕРЖКА перед редиректом
            setTimeout(function() {
               window.top.location.href = "https://buy.stripe.com/4gMdR9d8N2OpdJ10lt3AY0B";

            }, 50);
        }
        
    });

});