/* ==========================================================================
   Самописный квиз «Рассчитайте стоимость вашего проекта»
   Замена стороннего Marquiz. Зависимостей нет (vanilla JS + этот CSS).
   ========================================================================== */

/* --- Фиксированная кнопка слева (1-в-1 с прежней кнопкой Marquiz) --------- */
.lc-quiz-launcher {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 8px;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: #346b25;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(52, 107, 37, 0.5);
  font-family: "PT Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
}

.lc-quiz-launcher__text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.2px;
}

.lc-quiz-launcher__icon {
  width: 26px;
  height: 26px;
}

/* «Блик» — бегущий по кнопке отблеск, как у Marquiz (blicked: true) */
.lc-quiz-launcher::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: lc-quiz-blick 4.5s ease-in-out infinite;
}

@keyframes lc-quiz-blick {
  0%,
  60% {
    left: -60%;
  }
  85%,
  100% {
    left: 130%;
  }
}

/* --- Затемнение фона ------------------------------------------------------ */
.lc-quiz-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  padding: 40px 16px;
  -webkit-overflow-scrolling: touch;
}

.lc-quiz-overlay.is-open {
  display: block;
}

body.lc-quiz-locked {
  overflow: hidden;
}

/* Прячем кнопку-лаунчер, пока открыт квиз (чтобы не просвечивала сквозь фон) */
body.lc-quiz-locked .lc-quiz-launcher {
  display: none;
}

/* --- Карточка квиза -------------------------------------------------------- */
.lc-quiz {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  font-family: "PT Sans", sans-serif;
  color: #222;
}

.lc-quiz__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  z-index: 3;
}

.lc-quiz__close:hover {
  color: #555;
}

/* Верхняя плашка с заголовком */
.lc-quiz__topbar {
  padding: 18px 60px 16px 40px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  color: #555;
}

.lc-quiz__body {
  padding: 28px 40px 0;
}

.lc-quiz__title {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  color: #1d1d1d;
}

.lc-quiz__title--center {
  text-align: center;
  font-size: 30px;
  margin-top: 18px;
}

.lc-quiz__subtitle {
  text-align: center;
  color: #8a8a8a;
  margin: 4px 0 26px;
  font-size: 17px;
}

.lc-quiz__hint {
  display: inline-block;
  margin: 0 0 22px;
  padding: 5px 12px;
  border-radius: 6px;
  background: #fbe3d6;
  color: #cd5a2a;
  font-size: 14px;
  font-weight: 700;
}

.lc-quiz__hint::before {
  content: "\2713  ";
}

/* --- Сетка вариантов ------------------------------------------------------ */
.lc-quiz__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.lc-quiz__option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  user-select: none;
}

.lc-quiz__option:hover {
  border-color: #d98a63;
}

.lc-quiz__option.is-selected {
  border-color: #d98a63;
  box-shadow: inset 0 0 0 1px #d98a63;
  background: #fdf6f2;
}

/* Кружок (single) / квадрат (multi) */
.lc-quiz__marker {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid #ccc;
  background: #f1f1f1;
  position: relative;
}

.lc-quiz__option--radio .lc-quiz__marker {
  border-radius: 50%;
}

.lc-quiz__option--check .lc-quiz__marker {
  border-radius: 6px;
}

.lc-quiz__option.is-selected .lc-quiz__marker {
  background: #d98a63;
  border-color: #d98a63;
}

.lc-quiz__option.is-selected .lc-quiz__marker::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Вариант «Другое...» с полем ввода */
.lc-quiz__option--other {
  background: #f4f4f4;
  cursor: text;
}

.lc-quiz__option--other input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-family: inherit;
  outline: none;
}

/* --- Подвал шага ---------------------------------------------------------- */
.lc-quiz__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px 30px;
  margin-top: 24px;
}

.lc-quiz__steplabel {
  font-size: 16px;
  color: #555;
}

.lc-quiz__stepnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0 4px;
  border-radius: 50%;
  background: #cd5a2a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.lc-quiz__nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.lc-quiz__enterhint {
  font-size: 13px;
  color: #999;
}

.lc-quiz__enterhint b {
  color: #555;
}

.lc-quiz__btn {
  border: 0;
  border-radius: 8px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.lc-quiz__btn--next {
  background: #e08a5f;
  color: #fff;
}

.lc-quiz__btn--next:hover {
  background: #d77c4f;
}

.lc-quiz__btn--next:disabled {
  background: #e7b9a1;
  cursor: not-allowed;
}

.lc-quiz__btn--back {
  background: #fff;
  color: #555;
  border: 1px solid #ddd;
  padding: 14px 18px;
}

.lc-quiz__btn--wide {
  display: block;
  width: 100%;
  border-radius: 0 0 10px 10px;
  padding: 20px;
  font-size: 19px;
}

/* --- Финальный шаг (контакты) --------------------------------------------- */
.lc-quiz__contact {
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 30px 34px;
  margin-bottom: 16px;
}

.lc-quiz__field {
  margin-bottom: 18px;
}

.lc-quiz__field label {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
  color: #2b2b2b;
}

.lc-quiz__input {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0 14px;
  height: 60px;
}

.lc-quiz__input--focus,
.lc-quiz__input:focus-within {
  border-color: #e08a5f;
}

.lc-quiz__input .lc-quiz__icon {
  color: #9a9a9a;
  margin-right: 10px;
  font-size: 20px;
}

.lc-quiz__input .lc-quiz__prefix {
  white-space: nowrap;
  color: #333;
  margin-right: 10px;
  font-size: 18px;
}

.lc-quiz__input input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 18px;
  font-family: inherit;
  background: transparent;
  height: 100%;
}

.lc-quiz__messenger-toggle {
  width: 100%;
  background: #f1f1f1;
  border: 0;
  border-radius: 8px;
  padding: 16px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 18px;
}

.lc-quiz__messenger-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.lc-quiz__messenger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1f1f1;
  border: 1px solid #f1f1f1;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 18px;
  cursor: pointer;
}

.lc-quiz__messenger.is-selected {
  border-color: #e08a5f;
  background: #fdf6f2;
}

.lc-quiz__messenger img,
.lc-quiz__messenger span.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.lc-quiz__link {
  display: inline-block;
  color: #cd5a2a;
  cursor: pointer;
  text-decoration: underline;
  margin-bottom: 16px;
  font-size: 16px;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
}

.lc-quiz__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: #333;
  line-height: 1.4;
}

.lc-quiz__consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: #e08a5f;
  flex: 0 0 auto;
}

.lc-quiz__consent a {
  color: #cd5a2a;
}

.lc-quiz__error {
  display: none;
  color: #d33;
  font-size: 15px;
  text-align: center;
  margin: -6px 0 14px;
}

.lc-quiz__error.is-visible {
  display: block;
}

.lc-quiz__hidden {
  display: none !important;
}

/* --- Адаптив -------------------------------------------------------------- */
@media (max-width: 760px) {
  .lc-quiz__options,
  .lc-quiz__messenger-list {
    grid-template-columns: 1fr;
  }

  .lc-quiz__title {
    font-size: 26px;
  }

  .lc-quiz__title--center {
    font-size: 24px;
  }

  .lc-quiz__body,
  .lc-quiz__topbar {
    padding-left: 20px;
    padding-right: 20px;
  }

  .lc-quiz__footer {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    padding: 20px;
  }

  .lc-quiz__nav {
    justify-content: space-between;
  }

  .lc-quiz-launcher {
    font-size: 13px;
    padding: 16px 6px;
  }
}
