/* Site-wide dialogs. Rendered as body children, above headers, footer and wp-admin bar. */
body.kt-site .popup,
body.kt-site .popup-thanks {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(18, 24, 32, .4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .27s ease, visibility 0s linear .27s;
}
body.kt-site .popup.is-active,
body.kt-site .popup-thanks.is-active,
body.kt-site:not(.kt-modal-ready) .popup:target,
body.kt-site:not(.kt-modal-ready) .popup-thanks:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
body.kt-site.kt-modal-open { overflow: hidden; }
body.kt-site .popup-area,
body.kt-site .popup-thanks .popup-area {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: transparent;
}
body.kt-site .popup-body,
body.kt-site .popup-body-thanks {
  position: relative;
  z-index: 1;
  width: min(100%, 766px);
  min-height: 0;
  height: auto;
  margin: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
body.kt-site .popup-body-thanks { width: min(100%, 440px); }
body.kt-site .popup-content,
body.kt-site .popup-content-thanks {
  position: relative;
  width: 100%;
  height: auto;
  min-width: 0;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-sizing: border-box;
  margin: auto;
  border-radius: 16px;
  padding: clamp(24px, 4vw, 48px);
  background: #fff;
  color: #252525;
  box-shadow: 0 22px 70px rgba(18,24,32,.19);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: transform .3s cubic-bezier(.2,.75,.25,1), opacity .26s ease;
}
body.kt-site .popup.is-active .popup-content,
body.kt-site .popup-thanks.is-active .popup-content-thanks,
body.kt-site:not(.kt-modal-ready) .popup:target .popup-content,
body.kt-site:not(.kt-modal-ready) .popup-thanks:target .popup-content-thanks {
  opacity: 1;
  transform: translateY(0) scale(1);
}
body.kt-site .popup-content-thanks {
  min-height: 160px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
body.kt-site .popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  line-height: 1;
  font-size: 27px;
  color: #484848;
  border-radius: 50%;
  transition: background-color .18s ease, color .18s ease;
}
body.kt-site .popup-close:hover,
body.kt-site .popup-close:focus-visible {
  background: #fff0f2;
  color: #d00029;
}
body.kt-site .popup-title {
  margin: 0 0 28px;
  padding: 0 40px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.4;
  font-weight: 600;
}
body.kt-site .popup-title-thanks {
  padding: 0 18px;
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.4;
}
body.kt-site .popup-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
@media(max-width:770px) {
  body.kt-site .popup,
  body.kt-site .popup-thanks { padding: 14px; }
  body.kt-site .popup-content,
  body.kt-site .popup-content-thanks {
    max-height: calc(100dvh - 28px);
    padding: 38px 20px 24px;
  }
  body.kt-site .popup-title { margin-bottom: 20px; padding-right: 16px; }
}
@media(prefers-reduced-motion:reduce) {
  body.kt-site .popup,
  body.kt-site .popup-thanks,
  body.kt-site .popup-content,
  body.kt-site .popup-content-thanks,
  body.kt-site .popup-close { transition: none; }
}


/*
 * Contact Form 7 callback dialog.
 * Keep these rules inside #popup-call: the same CF7 markup is also used in
 * the wide consultation section, where it deliberately has another layout.
 */
body.kt-site #popup-call .popup-body {
  width: min(100%, 560px);
}

body.kt-site #popup-call .popup-content {
  padding: clamp(28px, 3.5vw, 42px);
  border: 1px solid #f0e8e9;
  border-radius: 20px;
  box-shadow: 0 26px 80px rgba(18, 24, 32, .22);
}

body.kt-site #popup-call .popup-title {
  margin: 0 42px 26px 0;
  padding: 0;
  color: #28282c;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.02em;
  text-wrap: balance;
}

body.kt-site #popup-call .popup-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #f6f6f7;
  color: #53535a;
  font-size: 27px;
  font-weight: 300;
  text-decoration: none;
}

body.kt-site #popup-call .popup-close:hover,
body.kt-site #popup-call .popup-close:focus-visible {
  background: #fce9ed;
  color: #d00029;
}

body.kt-site #popup-call :is(.wpcf7, .wpcf7-form, .kt-form-preview) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.kt-site #popup-call .wpcf7-form > p,
body.kt-site #popup-call .kt-form-preview > p {
  margin: 0 0 14px;
}

body.kt-site #popup-call :is(.wpcf7-form-control-wrap, .kt-form-preview p) {
  min-width: 0;
}

body.kt-site #popup-call .wpcf7-form > p > .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

body.kt-site #popup-call :is(.wpcf7-form, .kt-form-preview)
  :is(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea, select) {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 54px;
  height: auto;
  margin: 0;
  padding: 15px 18px;
  box-sizing: border-box;
  border: 1px solid #e2e2e5;
  border-radius: 12px;
  outline: none;
  background: #fafafa;
  color: #29292f;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: none;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

body.kt-site #popup-call :is(.wpcf7-form, .kt-form-preview)
  :is(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea)::placeholder {
  color: #85858c;
  opacity: 1;
}

body.kt-site #popup-call .wpcf7-form
  :is(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea, select):focus {
  border-color: #d00029;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(208, 0, 41, .1);
}

body.kt-site #popup-call .wpcf7-form .wpcf7-not-valid {
  border-color: #d00029 !important;
  background: #fff8f9 !important;
}

body.kt-site #popup-call .wpcf7-not-valid-tip {
  display: block;
  margin: 6px 0 0;
  color: #b40024;
  font-size: 12px;
  line-height: 1.45;
}

body.kt-site #popup-call .kt-form-consent {
  display: block;
  width: 100%;
  margin: 8px 0 20px;
  padding: 14px 16px;
  box-sizing: border-box;
  border: 1px solid #f0e9eb;
  border-radius: 12px;
  background: #fcf9fa;
  color: #606068;
  font-size: 12px;
  line-height: 1.55;
}

body.kt-site #popup-call .kt-form-consent p { margin: 0; }
body.kt-site #popup-call .kt-form-consent .wpcf7-list-item { display: block; }
body.kt-site #popup-call .kt-form-consent label {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}
body.kt-site #popup-call .kt-form-consent input[type="checkbox"] {
  flex: 0 0 18px;
  margin: 1px 0 0;
}
body.kt-site #popup-call .kt-form-consent .wpcf7-list-item-label {
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.kt-site #popup-call .kt-form-privacy-note {
  display: block;
  margin: 8px 0 0 28px;
  white-space: normal;
  font-size: 11px;
  line-height: 1.55;
}
body.kt-site #popup-call .kt-form-consent a {
  display: inline;
  color: #bd0025;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.kt-site #popup-call .wpcf7-form > p:last-of-type,
body.kt-site #popup-call .kt-form-preview > p:last-of-type {
  position: relative;
  margin: 0;
}

body.kt-site #popup-call :is(.wpcf7-form .wpcf7-submit, .kt-form-preview .help-btn) {
  display: block;
  width: 100%;
  min-height: 54px;
  height: auto;
  margin: 0;
  padding: 15px 24px;
  border: 1px solid #d00029;
  border-radius: 28px;
  background: #d00029;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

body.kt-site #popup-call .wpcf7-form .wpcf7-submit:hover:not(:disabled) {
  background: #b00023;
  border-color: #b00023;
  transform: translateY(-1px);
}
body.kt-site #popup-call .wpcf7-form .wpcf7-submit:disabled,
body.kt-site #popup-call .kt-form-preview .help-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
body.kt-site #popup-call .wpcf7-spinner {
  position: absolute;
  top: 50%;
  right: 15px;
  margin: -12px 0 0;
}

body.kt-site #popup-call .wpcf7-response-output {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #e8d4d8;
  border-radius: 10px;
  background: #fff9fa;
  color: #4b3d40;
  font-size: 12px;
  line-height: 1.55;
}
body.kt-site #popup-call .wpcf7-form[data-status="init"] .wpcf7-response-output { display: none; }
body.kt-site #popup-call .wpcf7-form[data-status="sent"] .wpcf7-response-output {
  border-color: #cce7d8;
  background: #f5fcf7;
  color: #28553b;
}

/* Keep the confirmation dialog visually consistent with the form. */
body.kt-site #popup-thanks .popup-content-thanks {
  padding: 42px 32px;
  border-radius: 20px;
  box-shadow: 0 26px 80px rgba(18, 24, 32, .22);
}
body.kt-site #popup-thanks .popup-title-thanks {
  margin: 0 0 10px;
  padding: 0 18px;
  color: #29292f;
  font-size: 23px;
  font-weight: 600;
}
body.kt-site #popup-thanks .popup-text { color: #686870; font-size: 14px; }

@media (max-width: 600px) {
  body.kt-site #popup-call .popup-content {
    padding: 54px 20px 24px;
    border-radius: 16px;
  }
  body.kt-site #popup-call .popup-title {
    margin: 0 0 22px;
    font-size: clamp(20px, 5.6vw, 24px);
  }
  body.kt-site #popup-call .popup-close { top: 12px; right: 12px; }
  body.kt-site #popup-call :is(.wpcf7-form, .kt-form-preview)
    :is(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea, select) {
    min-height: 52px;
    padding: 13px 15px;
    font-size: 16px;
  }
  body.kt-site #popup-call .kt-form-consent { padding: 12px; }
  body.kt-site #popup-call .kt-form-privacy-note { margin-left: 28px; }
  body.kt-site #popup-thanks .popup-content-thanks { padding: 52px 20px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  body.kt-site #popup-call :is(input, textarea, select, .wpcf7-submit) { transition: none; }
}
