/* ============================= */
/* NUTRILOGY CONTACT POPUP */
/* Compact spacing version */
/* ============================= */

.nutri-contact-popup,
.nutri-contact-popup * {
  box-sizing: border-box;
}

.nutri-contact-popup {
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  font-family: var(--nutri-font-main);
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.nutri-contact-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nutri-contact-popup__overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.84);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  cursor: pointer;
}

.nutri-contact-popup__dialog {
  width: min(980px, 100%);
  position: relative;
  z-index: 2;
  margin: auto;
  padding: 30px 38px 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  overflow: visible;
  background:
    linear-gradient(
      145deg,
      rgba(37, 38, 53, 0.99) 0%,
      rgba(19, 20, 31, 0.99) 100%
    );
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateY(22px) scale(0.98);
  transition: transform 0.28s ease;
}

.nutri-contact-popup.is-open .nutri-contact-popup__dialog {
  transform: translateY(0) scale(1);
}

.nutri-contact-popup__close {
  width: 42px;
  height: 42px;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.nutri-contact-popup__close:hover {
  border-color: rgba(108, 197, 167, 0.68);
  background: rgba(108, 197, 167, 0.12);
  transform: rotate(90deg);
}

.nutri-contact-popup__close:focus-visible {
  outline: 2px solid rgba(108, 197, 167, 0.95);
  outline-offset: 4px;
}

.nutri-contact-popup__close span {
  width: 17px;
  height: 17px;
  position: relative;
  display: block;
}

.nutri-contact-popup__close span::before,
.nutri-contact-popup__close span::after {
  content: "";
  width: 19px;
  height: 2px;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 2px;
  background: #ffffff;
}

.nutri-contact-popup__close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nutri-contact-popup__close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.nutri-contact-popup__head {
  max-width: 760px;
  margin: 0 0 22px;
  padding-right: 70px;
}

.nutri-contact-popup__title {
  margin: 0;
  padding: 0 0 10px 0;
  color: transparent;
  background: var(--nutri-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--nutri-font-title);
  font-size: clamp(33px, 3.28vw, 44px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.nutri-contact-popup__subtitle {
  max-width: 700px;
  margin: 9px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--nutri-font-main);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
}

/* ============================= */
/* CONTACT FORM 7 RESET */
/* ============================= */

.nutri-contact-popup__form,
.nutri-contact-popup__form .wpcf7,
.nutri-contact-popup__form .wpcf7-form {
  width: 100%;
  margin: 0;
}

.nutri-contact-popup__form p {
  margin: 0;
  padding: 0;
}

.nutri-contact-popup__form br {
  display: none;
}

/*
 * Contact Form 7 інколи автоматично загортає поля у <p>.
 * display: contents прибирає цей зайвий рівень із grid-розкладки.
 */
.nutri-contact-form__grid > p {
  display: contents;
}

/* ============================= */
/* FORM GRID */
/* ============================= */

.nutri-contact-form__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px 20px;
}

.nutri-contact-form__field {
  min-width: 0;
  margin: 0;
  display: block;
}

.nutri-contact-form__label {
  margin: 0 0 15px;
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--nutri-font-main);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 400;
}

.nutri-contact-popup__form .wpcf7-form-control-wrap {
  width: 100%;
  display: block;
  margin: 0;
}

.nutri-contact-popup__form
  input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.nutri-contact-popup__form textarea,
.nutri-contact-popup__form select {
  width: 100%;
  min-height: 48px;
  height: 48px;
  margin: 0;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  font-family: var(--nutri-font-main);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 400;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nutri-contact-popup__form textarea {
  min-height: 48px;
  height: 48px;
  resize: none;
}

.nutri-contact-popup__form input::placeholder,
.nutri-contact-popup__form textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.nutri-contact-popup__form input:focus,
.nutri-contact-popup__form textarea:focus,
.nutri-contact-popup__form select:focus {
  border-color: rgba(108, 197, 167, 0.82);
  background: rgba(108, 197, 167, 0.06);
  box-shadow: 0 0 0 3px rgba(108, 197, 167, 0.1);
}

/* ============================= */
/* CONSENT + BUTTON */
/* ============================= */

.nutri-contact-form__bottom {
  width: 100%;
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.nutri-contact-form__consent {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nutri-contact-form__consent-checkbox {
  flex: 0 0 22px;
}

.nutri-contact-form__consent-text {
  min-width: 0;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--nutri-font-main);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 400;
}

.nutri-contact-form__consent .wpcf7-form-control-wrap {
  margin: 0;
}

.nutri-contact-form__consent .wpcf7-acceptance {
  width: 100%;
  display: block;
}

.nutri-contact-form__consent .wpcf7-list-item {
  width: 100%;
  margin: 0;
  display: block;
}

.nutri-contact-form__consent .wpcf7-list-item > label {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.nutri-contact-form__consent .wpcf7-list-item-label {
  min-width: 0;
  padding-top: 1px;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--nutri-font-main);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 400;
}

.nutri-contact-form__consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  position: relative;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.nutri-contact-form__consent input[type="checkbox"]::after {
  content: "";
  width: 6px;
  height: 11px;
  position: absolute;
  left: 7px;
  top: 3px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(45deg);
}

.nutri-contact-form__consent input[type="checkbox"]:checked {
  border-color: #00a789;
  background: #00a789;
}

.nutri-contact-form__consent input[type="checkbox"]:checked::after {
  opacity: 1;
}

.nutri-contact-form__actions {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nutri-contact-popup__form input[type="submit"],
.nutri-contact-popup__form .wpcf7-submit,
.nutri-contact-popup__form .nutri-contact-form__submit {
  width: auto;
  min-width: 210px;
  min-height: 50px;
  margin: 0;
  padding: 12px 26px;
  border: 0;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00a789;
  color: #ffffff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--nutri-font-main);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 400;
  text-decoration: none;
  box-shadow: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nutri-contact-popup__form input[type="submit"]:hover,
.nutri-contact-popup__form .wpcf7-submit:hover,
.nutri-contact-popup__form .nutri-contact-form__submit:hover {
  background: #6bc29e;
  color: #ffffff;
  transform: translateY(-1px);
}

.nutri-contact-popup__form input[type="submit"]:focus-visible,
.nutri-contact-popup__form .wpcf7-submit:focus-visible,
.nutri-contact-popup__form .nutri-contact-form__submit:focus-visible {
  outline: 2px solid rgba(108, 197, 167, 0.95);
  outline-offset: 4px;
}

.nutri-contact-popup__form input[type="submit"]::before,
.nutri-contact-popup__form input[type="submit"]::after,
.nutri-contact-popup__form .wpcf7-submit::before,
.nutri-contact-popup__form .wpcf7-submit::after,
.nutri-contact-popup__form .nutri-contact-form__submit::before,
.nutri-contact-popup__form .nutri-contact-form__submit::after {
  content: none;
  display: none;
}

.nutri-contact-popup__form .wpcf7-spinner {
  margin: 0 0 0 10px;
  vertical-align: middle;
}

.nutri-contact-popup__form .wpcf7-not-valid-tip {
  margin-top: 4px;
  color: #ff9292;
  font-size: 12px;
  line-height: 1.3;
}

.nutri-contact-popup__form .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-width: 1px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.35;
}

.nutri-contact-popup__form form.sent .wpcf7-response-output {
  border-color: #6cc5a7;
  background: rgba(108, 197, 167, 0.1);
}

.nutri-contact-popup__form form.invalid .wpcf7-response-output,
.nutri-contact-popup__form form.failed .wpcf7-response-output {
  border-color: #ff9292;
  background: rgba(255, 90, 90, 0.08);
}

body.nutri-popup-open {
  overflow: hidden;
}

/* ============================= */
/* SHORT DESKTOP */
/* ============================= */

@media (min-width: 768px) and (max-height: 680px) {
  .nutri-contact-popup {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nutri-contact-popup__dialog {
    padding-top: 24px;
    padding-bottom: 22px;
  }

  .nutri-contact-popup__head {
    margin-bottom: 14px;
  }

  .nutri-contact-popup__title {
    font-size: 33px;
  }

  .nutri-contact-form__grid {
    gap: 14px 16px;
  }

  .nutri-contact-form__bottom {
    margin-top: 16px;
  }
}

/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width: 767px) {
  .nutri-contact-popup {
    align-items: flex-start;
    padding: 8px;
  }

  .nutri-contact-popup__dialog {
    width: 100%;
    margin: auto 0;
    padding: 34px 16px 20px;
    border-radius: 22px;
  }

  .nutri-contact-popup__close {
    width: 36px;
    height: 36px;
    top: 12px;
    right: 12px;
  }

  .nutri-contact-popup__head {
    margin-bottom: 19px;
    padding-right: 42px;
  }

  .nutri-contact-popup__title {
    font-size: 28px;
    line-height: 1.02;
    white-space: normal;
  }

  .nutri-contact-popup__subtitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.35;
  }

  .nutri-contact-form__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .nutri-contact-form__label {
    margin-bottom: 6px;
    font-size: 13px;
  }

  .nutri-contact-popup__form
    input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
  .nutri-contact-popup__form textarea,
  .nutri-contact-popup__form select {
    min-height: 46px;
    height: 46px;
    padding: 10px 13px;
    border-radius: 13px;
    font-size: 15px;
  }

  .nutri-contact-popup__form textarea {
    min-height: 62px;
    height: 62px;
  }

  .nutri-contact-form__bottom {
    margin-top: 17px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .nutri-contact-form__consent .wpcf7-list-item > label {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 14px;
  }

  .nutri-contact-form__consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .nutri-contact-form__consent input[type="checkbox"]::after {
    left: 6px;
    top: 2px;
  }

  .nutri-contact-form__consent .wpcf7-list-item-label {
    font-size: 12px;
    line-height: 1.3;
  }

  .nutri-contact-form__actions {
    justify-content: stretch;
  }

  .nutri-contact-popup__form input[type="submit"],
  .nutri-contact-popup__form .wpcf7-submit,
  .nutri-contact-popup__form .nutri-contact-form__submit {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 16px;
  }
}


.nutri-cooperation-request__privacy-link {
  position: relative;
  z-index: 5;
  display: inline-block;
  color: inherit;
  text-decoration: underline;
  pointer-events: auto;
  cursor: pointer;
}

.nutri-contact-form__consent a {
  color: #6cc5a7;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.nutri-contact-form__consent a:hover {
  color: #ffffff;
}
