html.ym-popup-lock,
html.ym-popup-lock body {
  overflow: hidden;
}

.ym-form-popup,
.ym-form-popup * {
  box-sizing: border-box;
}

.ym-form-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  padding: 26px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(5, 12, 26, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ym-form-popup.is-open {
  display: grid;
  place-items: center;
}

.ym-form-popup__dialog {
  position: relative;
  width: min(100%, 1180px);
  max-height: min(92vh, 980px);
  margin: auto;
  overflow: auto;
  border: 1px solid rgba(29, 49, 91, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(32, 60, 82, 0.07) 0, rgba(32, 60, 82, 0) 28%),
    #ffffff;
  box-shadow: 0 34px 100px rgba(5, 12, 26, 0.34);
}

.ym-form-popup__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: start;
  gap: 26px;
  padding: clamp(26px, 3vw, 46px) clamp(24px, 3.4vw, 56px) 0;
}

.ym-form-popup__content {
  width: 100%;
  padding: clamp(22px, 2.4vw, 32px) clamp(24px, 3.4vw, 56px) clamp(28px, 3.2vw, 52px);
}

.ym-form-popup__eyebrow {
  width: fit-content;
  min-height: 32px;
  margin: 0 0 18px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(32, 60, 82, 0.65);
  border-radius: 999px;
  color: var(--ym-color-blue, #203c52);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ym-form-popup__title {
  max-width: 880px;
  margin: 0;
  color: #000000;
  font-size: clamp(34px, 4.5vw, 62px);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.07em;
}

.ym-form-popup__text {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(17, 17, 17, 0.72);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.ym-form-popup__close {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(32, 60, 82, 0.28);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ym-color-blue, #203c52);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ym-form-popup__close::before,
.ym-form-popup__close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ym-form-popup__close::before {
  transform: rotate(45deg);
}

.ym-form-popup__close::after {
  transform: rotate(-45deg);
}

.ym-form-popup__close:hover {
  border-color: rgba(32, 60, 82, 0.62);
  background: #f3f6fb;
  transform: rotate(6deg);
}

.ym-form-popup .wpcf7,
.ym-form-popup .wpcf7 form,
.ym-form-popup .wpcf7-form {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ym-form-popup .wpcf7 p,
.ym-form-popup .wpcf7 br {
  margin: 0;
  padding: 0;
}

.ym-form-popup .wpcf7 br {
  display: none;
}

.ym-form-popup .wpcf7 fieldset,
.ym-form-popup .wpcf7 fieldset.hidden-fields-container,
.ym-form-popup .wpcf7 .hidden-fields-container,
.ym-form-popup .wpcf7 input[type="hidden"] {
  display: none !important;
}

.ym-form-popup .ym-speaking-form__grid,
.ym-form-popup .ym-cooperation-form__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.ym-form-popup .ym-speaking-form__field,
.ym-form-popup .ym-cooperation-form__field {
  position: relative;
  min-width: 0;
}

.ym-form-popup .ym-speaking-form__field--privacy,
.ym-form-popup .ym-cooperation-form__field--privacy,
.ym-form-popup .ym-speaking-form__privacy,
.ym-form-popup .ym-cooperation-form__privacy,
.ym-form-popup .ym-speaking-form__field--comment,
.ym-form-popup .ym-cooperation-form__field--comment,
.ym-form-popup .ym-cooperation-form__field--contact {
  grid-column: 1 / -1;
}

.ym-form-popup .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.ym-form-popup input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.ym-form-popup textarea,
.ym-form-popup select {
  width: 100% !important;
  max-width: 100% !important;
  height: 52px;
  min-height: 52px;
  padding: 0 18px;
  display: block;
  color: var(--ym-color-ink, #07142f);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(32, 56, 102, 0.18);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.03em;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ym-form-popup textarea {
  height: 118px;
  min-height: 118px;
  padding-top: 14px;
  line-height: 1.25;
  resize: vertical;
}

.ym-form-popup input::placeholder,
.ym-form-popup textarea::placeholder {
  color: rgba(5, 5, 5, 0.52);
}

.ym-form-popup input:not([type="hidden"]):not([type="submit"]):focus,
.ym-form-popup textarea:focus,
.ym-form-popup select:focus {
  background: #ffffff;
  border-color: var(--ym-color-blue, #203c52);
  box-shadow: 0 0 0 3px rgba(32, 60, 82, 0.1);
}

.ym-form-popup input.wpcf7-not-valid,
.ym-form-popup textarea.wpcf7-not-valid,
.ym-form-popup select.wpcf7-not-valid {
  border-color: #b84538 !important;
  box-shadow: 0 0 0 1px rgba(184, 69, 56, 0.2) !important;
}

.ym-form-popup .wpcf7-not-valid-tip,
.ym-form-popup .ym-speaking-form__client-error {
  display: block;
  margin: 7px 0 0;
  color: #b84538;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.ym-form-popup .ym-speaking-form__field--date,
.ym-form-popup .ym-cooperation-form__field--date {
  position: relative;
}

.ym-form-popup .ym-speaking-form__field--date input[type="date"],
.ym-form-popup .ym-cooperation-form__field--date input[type="date"] {
  padding-right: 46px;
  cursor: pointer;
}

.ym-form-popup .ym-speaking-form__field--date:not(.is-filled) input[type="date"],
.ym-form-popup .ym-cooperation-form__field--date:not(.is-filled) input[type="date"] {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.ym-form-popup .ym-speaking-form__field--date.is-filled input[type="date"],
.ym-form-popup .ym-cooperation-form__field--date.is-filled input[type="date"] {
  color: var(--ym-color-ink, #07142f);
  -webkit-text-fill-color: var(--ym-color-ink, #07142f);
}

.ym-form-popup .ym-speaking-form__date-placeholder,
.ym-form-popup .ym-cooperation-form__date-placeholder {
  position: absolute;
  left: 18px;
  top: 50%;
  z-index: 3;
  color: rgba(5, 5, 5, 0.52);
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.03em;
  transform: translateY(-50%);
  pointer-events: none;
}

.ym-form-popup .ym-speaking-form__field--date.is-filled .ym-speaking-form__date-placeholder,
.ym-form-popup .ym-cooperation-form__field--date.is-filled .ym-cooperation-form__date-placeholder {
  display: none;
}

.ym-form-popup .ym-speaking-form__field--date::after,
.ym-form-popup .ym-cooperation-form__field--date::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 26px;
  z-index: 4;
  width: 17px;
  height: 17px;
  background: url("../icons/calendar.svg") center / contain no-repeat;
  opacity: 0.7;
  transform: translateY(-50%);
  pointer-events: none;
}

.ym-form-popup input[type="date"]::-webkit-calendar-picker-indicator {
  width: 42px;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ym-form-popup .ym-speaking-form__field--privacy,
.ym-form-popup .ym-cooperation-form__field--privacy,
.ym-form-popup .ym-speaking-form__privacy,
.ym-form-popup .ym-cooperation-form__privacy {
  margin-top: 8px;
}

.ym-form-popup .ym-speaking-form__field--privacy .wpcf7-list-item,
.ym-form-popup .ym-cooperation-form__field--privacy .wpcf7-list-item,
.ym-form-popup .ym-speaking-form__privacy .wpcf7-list-item,
.ym-form-popup .ym-cooperation-form__privacy .wpcf7-list-item {
  display: block;
  margin: 0;
}

.ym-form-popup .ym-speaking-form__field--privacy label,
.ym-form-popup .ym-cooperation-form__field--privacy label,
.ym-form-popup .ym-speaking-form__privacy label,
.ym-form-popup .ym-cooperation-form__privacy label {
  position: relative;
  display: block;
  width: 100%;
  max-width: 880px;
  min-height: 28px;
  margin: 0;
  cursor: pointer;
}

.ym-form-popup input[type="checkbox"] {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 2;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  opacity: 0 !important;
  cursor: pointer;
}

.ym-form-popup .wpcf7-list-item-label,
.ym-form-popup .ym-speaking-form__privacy-text,
.ym-form-popup .ym-cooperation-form__privacy-text {
  position: relative !important;
  display: block !important;
  width: auto !important;
  max-width: 880px !important;
  min-height: 28px !important;
  padding: 2px 0 0 44px !important;
  color: rgba(17, 17, 17, 0.76) !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
  letter-spacing: -0.02em;
  white-space: normal !important;
}

.ym-form-popup .wpcf7-list-item-label::before,
.ym-form-popup .wpcf7-list-item-label::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ym-form-popup .wpcf7-list-item-label::before {
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(32, 60, 82, 0.58);
  border-radius: 8px;
  background: #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ym-form-popup .wpcf7-list-item-label::after {
  left: 10px;
  top: 7px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(45deg) scale(0.72);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ym-form-popup input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
  border-color: var(--ym-color-blue, #203c52);
  background: var(--ym-color-blue, #203c52);
  box-shadow: 0 6px 18px rgba(32, 60, 82, 0.14);
}

.ym-form-popup input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.ym-form-popup .wpcf7-list-item-label a,
.ym-form-popup .ym-speaking-form__privacy-text a,
.ym-form-popup .ym-cooperation-form__privacy-text a {
  color: var(--ym-color-blue, #203c52) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ym-form-popup .ym-speaking-form__submit-wrap,
.ym-form-popup .ym-cooperation-form__submit-wrap {
  margin-top: 24px;
}

.ym-form-popup input[type="submit"] {
  width: fit-content !important;
  min-width: min(100%, 330px);
  min-height: 58px;
  padding: 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--ym-color-blue, #203c52);
  border: 1px solid var(--ym-color-blue, #203c52);
  border-radius: 0;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.05;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(32, 56, 102, 0.14);
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ym-form-popup input[type="submit"]:hover {
  opacity: 0.88;
}

.ym-form-popup .wpcf7-spinner {
  margin: 14px 0 0 14px;
}

.ym-form-popup .wpcf7-response-output {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-width: 1px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.ym-cf7-honeypot,
.ym-cf7-antispam-fields {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  .ym-form-popup {
    padding: 16px;
    place-items: start center;
  }

  .ym-form-popup__dialog {
    width: min(100%, 760px);
    max-height: calc(100svh - 32px);
    border-radius: 18px;
  }

  .ym-form-popup__head {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 16px;
    padding: 26px 22px 0;
  }

  .ym-form-popup__content {
    padding: 20px 22px 30px;
  }

  .ym-form-popup__title {
    font-size: clamp(32px, 8vw, 46px);
  }

  .ym-form-popup .ym-speaking-form__grid,
  .ym-form-popup .ym-cooperation-form__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 767px) {
  .ym-form-popup {
    padding: 10px;
  }

  .ym-form-popup__dialog {
    max-height: calc(100svh - 20px);
    border-radius: 16px;
  }

  .ym-form-popup__head {
    padding: 22px 16px 0;
  }

  .ym-form-popup__content {
    padding: 18px 16px 24px;
  }

  .ym-form-popup__close {
    width: 40px;
    height: 40px;
  }

  .ym-form-popup__eyebrow {
    min-height: 30px;
    margin-bottom: 14px;
    padding: 0 13px;
    font-size: 13px;
  }

  .ym-form-popup__text {
    margin-top: 14px;
    font-size: 16px;
  }

  .ym-form-popup input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
  .ym-form-popup textarea,
  .ym-form-popup select {
    height: 48px;
    min-height: 48px;
    padding: 0 14px;
    font-size: 16px;
    border-radius: 8px;
  }

  .ym-form-popup textarea {
    height: 110px;
    min-height: 110px;
    padding-top: 12px;
  }

  .ym-form-popup .ym-speaking-form__date-placeholder,
  .ym-form-popup .ym-cooperation-form__date-placeholder {
    left: 14px;
    font-size: 16px;
  }

  .ym-form-popup .ym-speaking-form__field--date::after,
  .ym-form-popup .ym-cooperation-form__field--date::after {
    top: 24px;
  }

  .ym-form-popup .wpcf7-list-item-label,
  .ym-form-popup .ym-speaking-form__privacy-text,
  .ym-form-popup .ym-cooperation-form__privacy-text {
    padding-left: 40px !important;
    font-size: 14px !important;
  }

  .ym-form-popup input[type="checkbox"] {
    width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
  }

  .ym-form-popup .wpcf7-list-item-label::before {
    width: 26px;
    height: 26px;
  }

  .ym-form-popup input[type="submit"] {
    width: 100% !important;
    min-width: 0;
    min-height: 54px;
    padding: 0 18px;
    font-size: 16px;
    white-space: normal;
  }
}

.ym-form-popup .ym-speaking-form__field--date,
.ym-form-popup .ym-cooperation-form__field--date {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.ym-form-popup .ym-speaking-form__field--date input[type="date"],
.ym-form-popup .ym-cooperation-form__field--date input[type="date"] {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.ym-form-popup .ym-speaking-form__date-placeholder,
.ym-form-popup .ym-cooperation-form__date-placeholder {
  z-index: 3;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.ym-form-popup .ym-form-popup__client-error {
  display: block;
  margin: 7px 0 0;
  color: #b84538;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.ym-form-popup .ym-speaking-form__field--date .ym-form-popup__client-error,
.ym-form-popup .ym-cooperation-form__field--date .ym-form-popup__client-error {
  position: static;
  margin-top: 7px;
  user-select: text;
  -webkit-user-select: text;
}

/* Consultation popup form */
.ym-form-popup .ym-consultation-form__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.ym-form-popup .ym-consultation-form__field {
  position: relative;
  min-width: 0;
}

.ym-form-popup .ym-consultation-form__field--purpose,
.ym-form-popup .ym-consultation-form__field--comment,
.ym-form-popup .ym-consultation-form__privacy {
  grid-column: 1 / -1;
}

.ym-form-popup .ym-consultation-form__privacy {
  margin-top: 8px;
}

.ym-form-popup .ym-consultation-form__privacy .wpcf7-list-item {
  display: block;
  margin: 0;
}

.ym-form-popup .ym-consultation-form__privacy label {
  position: relative;
  display: block;
  width: 100%;
  max-width: 880px;
  min-height: 28px;
  margin: 0;
  cursor: pointer;
}

.ym-form-popup .ym-consultation-form__privacy-text {
  position: relative !important;
  display: block !important;
  width: auto !important;
  max-width: 880px !important;
  min-height: 28px !important;
  padding: 2px 0 0 44px !important;
  color: rgba(17, 17, 17, 0.76) !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
  letter-spacing: -0.02em;
  white-space: normal !important;
}

.ym-form-popup .ym-consultation-form__privacy-text a {
  color: var(--ym-color-blue, #203c52) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ym-form-popup .ym-consultation-form__submit-wrap {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .ym-form-popup .ym-consultation-form__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 767px) {
  .ym-form-popup .ym-consultation-form__privacy-text {
    padding-left: 40px !important;
    font-size: 14px !important;
  }
}
