* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

/* ==== Общая ширина ==== */
.wrapper,
.content {
  max-width: 1440px;
  margin: 0 auto;
  /* центрируем ограниченные блоки */
  width: 100%;
  height: 100%;
}

/* ==== Основные блоки ==== */
header {
  height: 93px;
  background: #f2f3ec;
}

footer {
  height: 85px;
  background: #56b4ad;
  color: white;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==== Белые линии над и под контентом ==== */
.white_line {
  background: white;
  height: 20px;
  width: 100%;
  flex-shrink: 0;
}

/* ==== Основная зона ==== */
.content {
  display: flex;
  flex: 1;
  background: #e8f6ee;
  max-width: 1440px;
  margin: 0 auto;
  flex-wrap: nowrap;
  /* ключевая строка */
}


/* Слева белый блок (только на десктопе) */
.white_spacer {
  flex: 0 0 47px;
  /* ширина белого поля */
  background: white;
}

/* Контентные колонки */
.left {
  flex: 0 1 420px;
  min-width: 420px;
  display: flex;
  flex-direction: row;
}

.transparent_spacer {
  flex: 0 0 20px;
  /* отступ слева внутри левой колонки */
}

.form_rows_container {
  flex: 1 0 400px;
  /* оставшееся место */
  display: flex;
  flex-direction: column;
}

.transparent_row_1 {
  flex: 0 0 20px;
  /* отступ сверху внутри формы */
}

.form_prompt {
  flex: 0 0 60px;
  /* место для текста над формой */
  background: white;
  display: flex;
  align-items: center;
  /* вертикальное выравнивание */
  justify-content: center;
  /* горизонтальное выравнивание */
  text-align: center;
  /* если несколько строк — выровнять по центру */
}

.transparent_row_3 {
  flex: 0 0 10px;
  /* отступ между текстом и формой */
}

.form_container {
  flex: 1 1;
  /* форма занимает всё оставшееся место */
}

.transparent_row_5 {
  flex: 0 0 5px;
  /* отступ между текстом и формой */
}

.right {
  flex: 1;
}


.left,
.right {

  padding: 0;
  background: #e8f6ee;
}

/* ==== Мобильная адаптация ==== */
@media (max-width: 1024px) {
  .content {
    flex-direction: column-reverse;
  }

  .white_spacer {
    display: none;
    /* белое поле исчезает на мобилке */
  }

  .white_line {
    display: none;
  }

  .transparent_spacer {
    display: none;
    /* отступ слева внутри левой колонки исчезает на мобилке */
  }

  .right {
    flex: 0 1 60px;
  }

  .left {
    flex: 1 0 auto;
    min-width: auto;
  }
}

.order_form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 2vh, 0.5rem);
  background: #00b7a1;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.order_form label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  font-size: 14px;
  color: #00272B;
}

.order_form button {
  margin-top: auto;
  /* выталкивает кнопку вниз */
}

.order_form button[type="submit"] {
  background-color: #2a7cff;
  color: white;
  font-weight: 600;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.order_form button[type="submit"]:hover {
  background-color: #1a66e0;
}

.order_form input[type="text"],
.order_form input[type="email"] {
  margin-top: 4px;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}

/* 1) Снимаем column именно у чекбокса и выравниваем по центру */
.order_form label.checkbox {
  display: flex;
  flex-direction: row;
  /* переопределяем */
  align-items: center;
  /* текст и квадрат по одной линии */
  gap: 10px;
  width: auto;
  /* не растягиваем на всю ширину */
}

/* 2) Сам квадрат — без смещений и растяжений */
.order_form label.checkbox input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
}

/* 3) Текст справа, без вертикального дрейфа */
.order_form label.checkbox span {
  line-height: 1.2;
  display: inline-block;
}


button {
  background: #000;
  color: #fff;
  border: none;
  padding: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

button:hover {
  opacity: 0.9;
}

/* ===== HEADER FLEX GRID ===== */
.header_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* placeholders — фиксированные гибкие промежутки */
.header_wrapper_placeholder_1 {
  flex: 0 0 40px;
}

.header_wrapper_placeholder_4 {
  flex: 1;
}

/* отталкивает лого и меню */
.header_wrapper_placeholder_6 {
  flex: 0 0 40px;
}

.header_wrapper_placeholder_8 {
  flex: 0 0 40px;
}

/* картинка с карточкой слева */
.header_wrapper_cardholder {
  flex: 0 0 58px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header_wrapper_cardholder img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Логотип Zakaz500 (обрезаем края) */
.header_wrapper_textlogoholder {
  flex: 0 0 220px;
  /* ширина по макету */
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* скрываем вылезающее */
}

.header_wrapper_textlogoholder img {
  width: 260px;
  /* чуть больше контейнера, чтобы “залезала” */
  object-fit: cover;
}

/* Ссылки справа */
.header_wrapper_aboutholder,
.header_wrapper_docslinkholder {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header_wrapper_aboutholder a,
.header_wrapper_docslinkholder a {
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  color: #000;
  transition: opacity 0.2s;
}

.header_wrapper_aboutholder a:hover,
.header_wrapper_docslinkholder a:hover {
  opacity: 0.7;
}

@media (max-width: 750px) {
  .header_wrapper_textlogoholder {
    display: none;
    /* скрываем отталкивающий блок */
  }

  .right_title {
    display: none;
    /* скрываем тексты на мобилке */
  }
}

/* ===== FOOTER FLEX GRID ===== */
.footer_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* placeholders — фиксированные гибкие промежутки */
.footer_wrapper_placeholder_1 {
  flex: 0 0 40px;
}

.footer_wrapper_placeholder_3 {
  flex: 1;
}

/* растягивающийся промежуток между элементами */
.footer_wrapper_placeholder_5 {
  flex: 0 0 40px;
}

/* Копирайт прижат к левому плейсхолдеру справа */
.footer_wrapper_copyrightholder {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
}

/* Стили для тултипа с стрелкой */
.footer_wrapper_supportholder {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.support-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  color: white;
  transition: opacity 0.2s;
  position: relative;
}

.support-link:hover {
  opacity: 0.7;
}

/* Стили для тултипа с стрелкой */
.tooltip-bubble {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 10px;
  padding: 12px;
  background: white;
  color: #333;
  font-size: 12px;
  border-radius: 8px;
  border: 2px solid #02C7BE;
  /* цвет границы */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Текст тултипа */
.tooltip-question {
  font-weight: 700;
  /* жирный */
  font-size: 13px;
  /* чуть больше */
  color: #333;
  white-space: nowrap;
}

.tooltip-action {
  font-weight: 500;
  font-size: 12px;
  color: #333;
  white-space: nowrap;
}

/* Основная стрелка (белая) */
.tooltip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 18px;
  border-width: 8px;
  border-style: solid;
  border-color: white transparent transparent transparent;
  z-index: 2;
  /* поверх обводки */
}

/* Обводка стрелки */
.tooltip-bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  right: 17px;
  border-width: 9px;
  border-style: solid;
  border-color: #02C7BE transparent transparent transparent;
  z-index: 1;
  /* под основной стрелкой */
}

/* Показываем тултип при ховере на ссылку */
.support-link:hover+.tooltip-bubble,
.tooltip-bubble:hover {
  opacity: 1;
  visibility: visible;
}

.right {
  flex: 1;
  background-image: url('/background-right.png');
  /* добавь свою картинку */
  background-size: contain;
  background-position: right center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: row;
}

/* Плейсхолдеры по бокам */
.right_left_placeholder {
  flex: 0 0 40px;
  /* фиксированная ширина слева */
}

.right_right_placeholder {
  flex: 0 1 620px;
  /* фиксированная ширина справа */
}

/* Контейнер для контента в правой колонке */
.right_content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Плейсхолдеры для регулировки положения */
.right_placeholder_top {
  flex: 0 0 90px;
  /* растягивается чтобы вытолкнуть контент вниз */
  min-height: 0;
}

.right_content_container {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.right_placeholder_bottom {
  flex: 1;
  /* растягивается чтобы вытолкнуть контент вверх */
  min-height: 0;
}

/* Стили для текста и кнопки */
.right_title {
  font-size: 22px;
  font-weight: 700;
  color: #004076;
  line-height: 1.2;
  text-align: left;
}

.right_subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #4AB87E;
  /* зелёный цвет */
  line-height: 1.3;
  text-align: left;
}

.right_button {
  background: #4AB87E;
  color: white;
  border: none;
  padding: 14px 35px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
  align-self: flex-start;
  transition: opacity 0.2s;
}

.right_button:hover {
  opacity: 0.9;
}

/* Мобильная версия */
@media (max-width: 1024px) {
  .right {
    flex: 1 1 60px;
    flex-direction: row;
    min-height: 100px;
    background: none;
  }

  .right_left_placeholder,
  .right_right_placeholder {
    flex: 0 0 20px;
    /* уменьшаем боковые отступы на мобилке */
  }

  .right_content {
    flex-direction: row;
  }

  .right_placeholder_top,
  .right_placeholder_bottom {
    display: none;
  }

  .right_content_container {
    flex: 1;
    /* flex-direction: row;*/
    align-items: center;
    justify-content: space-between;
    gap: 2px;
  }

  .right_button {
    align-self: center;
    margin: 0 auto;
    /* центрируем кнопку */
  }

  .right_subtitle {
    display: block;
    /* показываем текст на мобилке */
    text-align: center;
    /* выравниваем по центру */
    font-size: 16px;
    /* можно настроить размер */
    line-height: 1.4;
  }
}

.transparent_row_oferta {
  flex: 0 0 5px;
  /* маленький отступ между чекбоксом и ссылкой */
}

.oferta_link_container {
  display: flex;
  justify-content: flex-start;
  padding-left: calc(16px + 8px);
  /* ширина чекбокса + gap */
  margin-top: -10px;
}

.oferta_link {
  font-size: 14px;
  /* чуть побольше шрифт */
  color: #757575;
  /* серый цвет */
  text-decoration: underline;
  /* подчёркнута */
  font-weight: 400;
  transition: opacity 0.2s;
}

.oferta_link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.error-message {
  display: none;
  background: #ffe6e6;
  border: 1px solid #ff9999;
  color: #b30000;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.error-message.active {
  display: block;
}

.amount-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  position: relative;
}

.amount-row input {
  width: 100%;
}

.converted-amount {
  align-self: flex-end;
  font-size: 13px;
  font-weight: 600;
  color: #777; /* серый по умолчанию */
  margin-right: 4px;
  transition: color 0.2s ease;
}

.converted-amount.active {
  color: #003b3f; /* чёрный/тёмный при вводе */
}

.form_prompt.hidden {
    display: none !important;
}

.flex-debug.form_prompt.hidden {
  display: none !important;
}

.form_container {
  display: flex;
  flex-direction: column;
}

.order_form {
  flex: 1;
}

/* === Кнопка во время загрузки === */
button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top-color: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/*
.flex-debug {
  outline: 1px dashed rgba(0, 150, 255, 0.6);
  outline-offset: -1px;
  position: relative;
  z-index: 1;
}
*/