.tarif {
  width: 100%;
  position: relative;
  height: fit-content;
  background-color: rgba(177, 164, 226, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* z-index: -1; */
  overflow: hidden;
}

.tarif__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 1200px;
  padding: 120px 30px 120px 30px;
  box-sizing: border-box;
  z-index: 3;

  @media (max-width: 1000px) {
    padding: 150px 30px;
  }

  @media (max-width: 600px) {
    padding: 90px 30px;
  }
}

.tarif__title {
  font-family: "Karton";
  font-size: 54px;
  color: white;
  font-weight: 400;
  margin: 0;
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
  position: relative;
  z-index: 1232889;

  @media (max-width: 600px) {
    font-size: 30px;
    margin-bottom: 25px;
  }
}

.tarif__content {
  display: flex;
  align-items: stretch;
  gap: 30px;
  width: 100%;

  @media (max-width: 1000px) {
    flex-direction: column;
    align-items: center;
  }
}

.tarif__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  z-index: 10000000;
}

.tarif__input {
  padding: 20px 30px;
  border: none;
  background-color: white;
  border-radius: var(--button-border-radius);
  width: 100%;

  @media (max-width: 1000px) {
    padding: 15px 20px;
  }
}

/* ===== Кастомный select =====
   Убираем нативную стрелку, рисуем свою через SVG в фоне.
   Серый цвет «плейсхолдера» — через :invalid (срабатывает пока
   выбран первый disabled option без value). После выбора реального
   значения цвет станет основным (наследуется от формы / body). */
.tarif__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  color: inherit;
  font: inherit;

  /* SVG-галочка как фон в правой части */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10' fill='none'><path d='M1 1L8 8L15 1' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 30px center;
  padding-right: 60px;  /* место под стрелку, чтобы текст не наезжал */

  @media (max-width: 1000px) {
    background-position: right 20px center;
    padding-right: 45px;
  }
}

/* Серый «плейсхолдер»: пока выбран disabled-option без value,
   select :invalid — красим в серый под цвет плейсхолдеров инпутов. */
.tarif__select:invalid {
  color: #999;
}

/* В выпадающем списке опции должны выглядеть нормально,
   а не серыми (некоторые браузеры наследуют цвет от :invalid). */
.tarif__select option {
  color: #000;
}
.tarif__select option[disabled] {
  color: #999;
}

/* Чтобы форма не показывала «обязательное поле» при потере фокуса
   из-за required + selected disabled option — :invalid сработает,
   но это нам и нужно для серого цвета. Никаких побочных эффектов. */

.tarif__button {
  padding: 20px 30px;
  border: none;
  background-color: var(--color-orange);
  border-radius: var(--button-border-radius);
  text-transform: uppercase;
  color: white;
  width: 100%;
  font-weight: 700;

  @media (max-width: 1000px) {
    padding: 15px 20px;
  }
}

.tarif__video-wrapper {
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
  flex: 1;
  z-index: 100000;

  @media (max-width: 1000px) {
    aspect-ratio: 1 / 1;
    align-self: auto;
    width: 100%;
    max-width: 500px;
  }
}

.tarif__video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--button-border-radius);
  object-fit: cover;
}

.tarif__conf {
  display: flex;
  gap: 20px;
  align-items: center;
  z-index: 10000;
}

.tarif__politics {
  color: white;
  font-size: 16px;
}

.tarif__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  border: 1px solid white;
  background-color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.tarif__checkbox:checked {
  background-color: var(--color-orange);
  border-color: var(--color-orange);
}

.tarif__checkbox:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
  width: 6px;
  height: 11px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
}

/* =========================================================
   Декоративки с параллаксом.
   transform используется JS-скриптом параллакса. Декоративки,
   у которых есть СВОЙ базовый transform (rotate, translateX),
   объявляют его через CSS-переменную --base-transform —
   скрипт сохранит этот базовый transform и допишет к нему сдвиг.
   ========================================================= */

.tarif__cloud {
  position: absolute;
  z-index: 3;
  top: -60px;
  left: -50px;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 1000px) {
    /* width: 280px; */
    top: -15px;
    /* left: -150px; */
  }

  @media (max-width: 600px) {
    width: 280px;
    top: 25px;
    left: -150px;
  }
}

.tarif__lights {
  position: absolute;
  top: 115px;
  left: 0;
  z-index: 3;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 1000px) {
    top: 140px;
    left: -20px;
    --base-transform: rotate(-10deg);
  }

  @media (max-width: 600px) {
    display: none;
  }
}

.tarif__lights-mobile {
  display: none;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 600px) {
    display: block;
    position: absolute;
    top: 150px;
    left: -10px;
    z-index: 3;
    --base-transform: rotate(-10deg);
  }
}

.tarif__barrel {
  position: absolute;
  bottom: 0;
  /* было: right: 50%; transform: translateX(77%);
     теперь — через right, чтобы освободить transform для параллакса */
  right: calc(50% - 250px);   /* подкорректируйте под визуальную позицию */
  z-index: 2;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 600px) {
    display: none;
  }
}

.tarif__barrel-mobile {
  display: none;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 600px) {
    display: block;
    position: absolute;
    bottom: 20px;
    left: calc(15% + 5px);   /* было: left: 15%; transform: translateX(5%); */
    z-index: 2;
  }
}

.tarif__tree-left {
  position: absolute;
  z-index: 2;
  top: 70px;
  left: 0;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 1000px) {
    display: none;
  }
}

.tarif__tree-right {
  position: absolute;
  z-index: 2;
  top: 50px;
  right: 0;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 1000px) {
    display: none;
  }
}

.tarif__tree-left-mobile {
  display: none;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 1000px) {
    height: 100%;
    display: block;
    position: absolute;
    z-index: 2;
    top: 70px;
    left: 0;
  }
}

.tarif__tree-right-mobile {
  display: none;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 1000px) {
    height: 100%;
    display: block;
    position: absolute;
    z-index: 2;
    top: 50px;
    right: 0;
  }
}

/* .tarif__wave-top {
  position: relative;
  width: 100%;
  z-index: 11001;
} */

.tarif__map {
  position: absolute;
  z-index: 3;
  top: 50px;
  right: 7px;
  will-change: transform;
  pointer-events: none;

  @media (max-width: 600px) {
    width: 150px;
  top: 150px;
  }
}

.tarif__wave-top {
  position: relative;
    height: 108px;
    width: 100%;
    background-image: url('/assets/wave-top-test.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    /* margin-top: -147px; */
    z-index: 100999;

    @media (max-width: 768px) {
    /* margin-top: -100px; */
    }
}
