/* =========================================================
   POPUP «Замовити відеодемонстрацію» — за макетом (Figma 2815:74727)
========================================================= */
#popup-video-demo-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 30px 30px 34px;
  background: #fff;
  font-family: 'Inter Tight', sans-serif;
  color: #242f33;
  text-align: left;
}

#popup-video-demo-wrapper .popup-heading {
  margin: 0 0 24px;
  padding-right: 30px;
  font-weight: 600;
  font-size: 20px;
  line-height: 24px;
  color: #242f33;
}

/* Хрестик закриття */
#popup-video-demo-wrapper .mfp-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  padding: 0;
  opacity: 1;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

#popup-video-demo-wrapper .mfp-close::before,
#popup-video-demo-wrapper .mfp-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 1.5px;
  margin: -0.75px 0 0 -8.5px;
  border-radius: 2px;
  background: #7d7c7c;
  transform: rotate(45deg);
  transition: background-color 0.2s ease;
}

#popup-video-demo-wrapper .mfp-close::after {
  transform: rotate(-45deg);
}

#popup-video-demo-wrapper .mfp-close:hover::before,
#popup-video-demo-wrapper .mfp-close:hover::after {
  background: #242f33;
}

/* Поля */
#popup-video-demo-wrapper .popup-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#popup-video-demo-wrapper .popup-field label {
  display: block;
  margin: 0 0 5px 10px;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #242f33;
}

#popup-video-demo-wrapper .required {
  color: #ef7038;
}

#popup-video-demo-wrapper .popup-field input {
  display: block;
  width: 100%;
  height: 43px;
  padding: 6px 10px;
  border: 2px solid #f3f3f3;
  border-radius: 3px;
  background: #fff;
  box-shadow: none;
  outline: none;
  font-family: inherit;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #242f33;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease;
}

#popup-video-demo-wrapper .popup-field input::placeholder {
  color: #7d7c7c;
  opacity: 1;
}

#popup-video-demo-wrapper .popup-field input:hover {
  border-color: #ddebe4;
}

#popup-video-demo-wrapper .popup-field input:focus {
  border-color: #33815c;
}

#popup-video-demo-wrapper .error_style,
#popup-video-demo-wrapper .popup-field input.error_style {
  border-color: #e05243;
}

#popup-video-demo-wrapper .text-danger {
  margin-top: 5px;
  font-size: 12px;
  line-height: 16px;
  color: #e05243;
  animation: popup-video-fade 0.3s ease;
}

/* Зручний месенджер */
#popup-video-demo-wrapper .popup-messengers {
  margin-top: 20px;
}

#popup-video-demo-wrapper .popup-messengers__title {
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  color: #242f33;
}

/* Сітка до 3 колонок (--cols з шаблону): чекбокс 20px + іконка 25px, крок між колонками 104px (gap 49px) */
#popup-video-demo-wrapper .popup-messengers__list {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), max-content);
  justify-content: center;
  gap: 15px 49px;
}

#popup-video-demo-wrapper .popup-messenger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

#popup-video-demo-wrapper .popup-messenger input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#popup-video-demo-wrapper .popup-messenger__check {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1px solid #242f33;
  border-radius: 5px;
  background: #fff no-repeat center / 15px 15px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#popup-video-demo-wrapper .popup-messenger:hover .popup-messenger__check {
  border-color: #33815c;
}

#popup-video-demo-wrapper .popup-messenger input:checked + .popup-messenger__check {
  border-color: #33815c;
  background-color: #33815c;
  background-image: url('check.svg');
}

#popup-video-demo-wrapper .popup-messenger input:focus-visible + .popup-messenger__check {
  box-shadow: 0 0 0 2px rgba(51, 129, 92, 0.3);
}

#popup-video-demo-wrapper .popup-messenger__icon {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

#popup-video-demo-wrapper .popup-messenger__name {
  font-size: 14px;
  line-height: 20px;
  color: #242f33;
}

#popup-video-demo-wrapper .popup-messengers__list.error_style .popup-messenger__check {
  border-color: #e05243;
}

#popup-video-demo-wrapper .popup-messengers .text-danger {
  text-align: center;
}

/* Плашка помилки (main.css, .auth-modal__error) — перекриваємо загальний .text-danger вище */
#popup-video-demo-wrapper .text-danger.auth-modal__error {
  margin-top: 2px;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

/* Кнопка «Відправити» */
#popup-video-demo-wrapper .popup-footer {
  margin-top: 24px;
}

/* Згода: решта стилів спільна з модалкою реєстрації (main.css, .auth-modal__agree); за макетом — 15px над кнопкою */
#popup-video-demo-wrapper .popup-agree {
  margin: -4px 0 15px;
}

#popup-video-demo-wrapper #popup-video-send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 43px;
  padding: 12px 10px 13px;
  border: 0;
  border-radius: 3px;
  background: #33815c;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

#popup-video-demo-wrapper #popup-video-send-button:hover {
  background: #2a6b4c;
}

#popup-video-demo-wrapper #popup-video-send-button.is-loading {
  opacity: 0.7;
  cursor: wait;
}

/* Успішна відправка */
#popup-video-demo-wrapper.is-sent .popup-footer {
  display: none;
}

#popup-video-demo-wrapper .popup-success {
  font-size: 14px;
  line-height: 20px;
  color: #7d7c7c;
  animation: popup-video-fade 0.35s ease;
}

#popup-video-demo-wrapper .popup-success__title {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  color: #33815c;
}

#popup-video-demo-wrapper .popup-success p {
  margin: 0;
}

@keyframes popup-video-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  #popup-video-demo-wrapper {
    padding: 24px 20px 20px;
  }

  #popup-video-demo-wrapper .popup-heading {
    font-size: 18px;
  }
}
