
/* ============================================
   VIVARO — QUESTION FORM SUCCESS
   ============================================ */

.question-form__fields {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.question-form__fields.is-leaving {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

/* Благодарность */

.question-form__success[hidden] {
  display: none !important;
}

.question-form__success {
  width: 100%;
  min-height: 280px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  padding: 30px 12px;

  opacity: 0;
  transform: translateY(16px);

  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.question-form__success.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.question-form__success-icon {
  color: #D66B18;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 18px;
}

.question-form__success-title {
  margin: 0 0 14px;

  font-family: "Mak", serif;
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 400;
  line-height: 1.1;
}

.question-form__success-text {
  margin: 0;
  max-width: 420px;

  font-family: "Nata Sans", Arial, sans-serif;
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1.45;
}

.question-form__success-caption {
  margin: 16px 0 0;
  font-family: "Nata Sans", Arial, sans-serif;
  font-size: 13px;
  opacity: 0.6;
}

/* Скрываем стандартный текст успешной отправки */
.question-form [data-formit-success-message] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .question-form__fields,
  .question-form__success {
    transition: none;
  }
}




/* ================================================
   FORM IT — QUESTIONS FORM
   ================================================ */

.question-form__error {
  display: block;
  color: #b3261e;
  font-size: 12px;
  line-height: 1.4;
}

.question-form__error:empty {
  display: none;
}

.question-form__message {
  font-size: 13px;
  line-height: 1.5;
}

.question-form__message:empty {
  display: none;
}

/* Состояние отправки */
.question-form.formit-loading {
  opacity: 0.7;
}

.question-form.formit-loading
.question-form__submit {
  cursor: wait;
}

/* Отключенная кнопка */
.question-form__submit:disabled {
  cursor: wait;
  opacity: 0.55;
}



/* =========================================================
   10. НИЖНИЙ ФОС / CONTACT ORDER
   ========================================================= */

.contact-order {
  position: relative;

  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  align-items: stretch;

  gap: clamp(70px, 8vw, 140px);

  padding:
    var(--space-section)
    var(--page-right-gap)
    var(--space-section)
    var(--page-left-gap);

  overflow: visible;
}


/* =========================================================
   ДВЕ ОСНОВНЫЕ КОЛОНКИ
   ========================================================= */

.contact-order__form-column,
.contact-order__cart-wrap {
  position: relative;
  z-index: 1;

  min-width: 0;

  /*
   * Одинаковая базовая высота
   * формы и синего блока.
   */
  min-height: 420px;
}


/* =========================================================
   FORM COLUMN
   ========================================================= */

.contact-order__form-column {
  display: flex;
  flex-direction: column;

  justify-content: center;
}


/* =========================================================
   HEADING
   ========================================================= */

.contact-order h2 {
  position: relative;
  z-index: 7;

  margin: 0;

  font-size: clamp(22px, 1.65vw, 30px);
  font-weight: 300;
  line-height: 1.04;

  letter-spacing: -.1px;
}


/* =========================================================
   QUESTION FORM
   ========================================================= */

.question-form {
  position: relative;
  z-index: 7;

  display: grid;

  gap: 24px;

  width: min(100%, 520px);

  margin-top: var(--space-heading);
}


.question-form label {
  display: block;
}


.question-form input {
  width: 100%;
  height: 46px;

  padding: 0 6px;

  border: 0;
  border-bottom: 1px solid #6b6b68;
  border-radius: 0;

  outline: none;

  color: #111;
  background: transparent;

  text-align: center;

  font-size: 17px;
}


.question-form input::placeholder {
  color: #282828;

  opacity: 1;
}


.question-form input:focus {
  border-bottom-color: var(--accent);
}


/* =========================================================
   FORM BUTTON
   ========================================================= */

.question-form__submit {
  display: grid;
  place-items: center;

  width: 100%;
  min-height: 52px;

  margin-top: 8px;
  padding: 0 28px;

  border: 2px solid var(--accent);
  border-radius: 999px;

  color: #111;
  background: transparent;

  font: inherit;
  font-size: 19px;
  font-weight: 300;
  line-height: 1;

  /*
   * Убираем нативное оформление Safari / iOS.
   */
  -webkit-appearance: none;
  appearance: none;

  /*
   * Safari иногда отдельно применяет цвет текста
   * внутри form controls.
   */
  -webkit-text-fill-color: #111;

  opacity: 1;

  cursor: pointer;

  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}


/* =========================================================
   HOVER — только устройства, где hover реально существует
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

  .question-form__submit:hover {
    color: #fff;
    background: var(--accent);

    -webkit-text-fill-color: #fff;
  }

}


/* =========================================================
   KEYBOARD FOCUS
   ========================================================= */

.question-form__submit:focus-visible {
  color: #fff;
  background: var(--accent);

  -webkit-text-fill-color: #fff;

  outline: none;
}


/* =========================================================
   ACTIVE / TAP
   ========================================================= */

.question-form__submit:active {
  transform: scale(.99);
}


/* =========================================================
   DISABLED
   Если JS или форма временно отключает кнопку,
   Safari больше не делает текст почти белым.
   ========================================================= */

.question-form__submit:disabled,
.question-form__submit[disabled] {
  color: #6b6b68;

  background: transparent;

  border-color: var(--accent);

  -webkit-text-fill-color: #6b6b68;

  opacity: 1;

  cursor: default;
}


.question-form__message {
  min-height: 18px;

  margin: -8px 0 0;

  color: #5c5c59;

  font-size: 13px;
  text-align: center;
}


/* =========================================================
   WHEAT DECOR
   DESKTOP:
   лежит поверх двух колонок
   ========================================================= */

.contact-order__wheat {
  position: absolute;
  z-index: 5;

  left: 50%;
  bottom: 0;

  display: block;

  width: clamp(360px, 34vw, 420px);
  height: auto;

  max-width: none;

  transform:
    translateX(-50%);

  pointer-events: none;
  user-select: none;
}


/* =========================================================
   CART COLUMN
   ========================================================= */

.contact-order__cart-wrap {
  display: grid;
}


/*
 * msOrderTotal находится внутри этого wrapper.
 * Он тоже должен растянуться на всю высоту колонки.
 */
#contact-cart-state {
  display: grid;

  width: 100%;
  height: 100%;

  min-width: 0;
}


/* =========================================================
   CART STATE
   ========================================================= */

.cart-state {
  position: relative;
  z-index: 1;

  display: grid;

  width: 100%;
  height: 100%;

  min-width: 0;
  min-height: 420px;

  place-items: center;
  align-content: center;

  gap: 42px;

  padding:
    42px
    40px;

  overflow: hidden;
  isolation: isolate;

  color: #fff;
  background: var(--sidebar-bg);

  text-align: center;
}


/*
 * Контент корзины выше пшеницы.
 */
.cart-state p,
.cart-state a {
  position: relative;
  z-index: 7;
}


.cart-state p {
  margin: 0;

  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 300;
  line-height: 1.25;
}


.cart-state a {
  display: grid;

  width: min(100%, 230px);
  min-height: 50px;

  place-items: center;

  padding:
    0
    30px;

  border-radius: 999px;

  color: #111;
  background: #fff;

  font-size: 18px;
  line-height: 1;

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}


.cart-state a:hover,
.cart-state a:focus-visible {
  opacity: .88;

  transform:
    translateY(-2px);

  outline: none;
}


/* =========================================================
   BLUE PATTERN
   DESKTOP — скрыт
   ========================================================= */

.blue-pattern--cart {
  display: none;
}


/* =========================================================
   <= 1280px
   ========================================================= */

@media (max-width: 1280px) {

  .contact-order {
    gap: clamp(48px, 6vw, 90px);
  }


  .contact-order__form-column,
  .contact-order__cart-wrap,
  .cart-state {
    min-height: 390px;
  }


  .contact-order__wheat {
    width:
      clamp(
        320px,
        32vw,
        480px
      );
  }


  .cart-state {
    padding:
      38px
      32px;
  }

}


/* =========================================================
   <= 1024px
   ========================================================= */

@media (max-width: 1024px) {

  .contact-order {
    gap: 42px;

    padding-right:
      var(--tablet-page-gap);

    padding-left:
      var(--tablet-page-gap);
  }


  .contact-order__form-column,
  .contact-order__cart-wrap,
  .cart-state {
    min-height: 360px;
  }


  .contact-order__wheat {
    width:
      clamp(
        280px,
        31vw,
        390px
      );

    left: 50%;
  }


  .cart-state {
    gap: 32px;

    padding:
      32px
      26px;
  }


  .cart-state p {
    font-size: 22px;
  }


  .cart-state a {
    width: min(100%, 220px);

    font-size: 16px;
  }

}


/* =========================================================
   <= 760px
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

  .contact-order {
    grid-template-columns:
      minmax(0, 1fr);

    gap: var(--space-section);

    padding-top:
      var(--space-section);

    overflow: hidden;
  }


  /* На mobile высота больше не связывается */

  .contact-order__form-column,
  .contact-order__cart-wrap {
    min-height: 0;
  }


  .contact-order__form-column {
    justify-content: flex-start;
  }


  .contact-order h2 {
    letter-spacing: -.4px;
  }


  .question-form {
    width: 100%;

    margin-top:
      var(--space-heading);
  }


  /* Desktop wheat полностью убираем */

  .contact-order__wheat {
    display: none;
  }


  /* ---------------------------------------------------------
     CART MOBILE
     --------------------------------------------------------- */

  .contact-order__cart-wrap {
    width: 100%;
  }


  #contact-cart-state {
    height: auto;
  }


  .cart-state {
    width: 100%;
    height: auto;

    min-height: 270px;

    gap: 32px;

    padding:
      34px
      28px;
  }


  /* ---------------------------------------------------------
     BLUE PATTERN MOBILE
     --------------------------------------------------------- */

  .blue-pattern--cart {
    position: absolute;
    z-index: 0;

    top: -19%;
    left: -19%;

    display: block;

    width: 138%;
    height: 138%;

    max-width: none;

    object-fit: cover;

    opacity: .24;

    pointer-events: none;
    user-select: none;
  }

}


/* =========================================================
   <= 480px
   ========================================================= */

@media (max-width: 480px) {

  .contact-order {
    padding-right:
      var(--mobile-page-gap);

    padding-bottom:
      var(--space-section);

    padding-left:
      var(--mobile-page-gap);
  }


  .contact-order h2 {
    font-size: 24px;
  }


  .question-form {
    gap: 18px;
  }


  .question-form input {
    font-size: 16px;
  }


  .question-form__submit {
    font-size: 17px;
  }


  .cart-state {
    min-height: 250px;

    gap: 30px;

    padding:
      28px
      20px;
  }


  .cart-state p {
    font-size: 21px;
  }


  .cart-state a {
    width: 100%;

    min-width: 0;

    font-size: 16px;
  }


  .blue-pattern--cart {
    top: -22%;
    left: -24%;

    width: 148%;
    height: 148%;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .question-form__submit,
  .cart-state a {
    transition-duration:
      .01ms !important;
  }

}