/* =========================
   «Оставить заявку»: #request offset + modal with CF7 126
   (template-parts/forms/request-trigger.php, styles/request-trigger.js)
========================= */

/* Hash navigation without JS (/#request): keep the form title below the fixed header. */
#request {
  scroll-margin-top: 110px;
}

@media (max-width: 1024px) {
  #request {
    scroll-margin-top: 90px;
  }
}

html.gz-request-modal-open,
html.gz-request-modal-open body {
  overflow: hidden;
}

.gz-request-modal {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 32px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--color-accent-text);
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.gz-request-modal:not([open]) {
  display: none;
}

/* Above the fixed header (z-index 9999) for browsers without the top layer. */
.gz-request-modal[open] {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.gz-request-modal::backdrop {
  background: rgba(32, 34, 20, 0.62);
}

.gz-request-modal__box {
  position: relative;
  padding: 48px 44px 40px;
  text-align: center;
}

.gz-request-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 30px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.gz-request-modal__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.gz-request-modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.gz-request-modal__title {
  margin: 0 0 10px;
  font-family: Garamond, Georgia, serif;
  font-size: 46px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
}

.gz-request-modal__text {
  margin: 0 0 26px;
  font-family: "Blogger Sans", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #fff;
}

.gz-request-modal .wpcf7-response-output {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 767px) {
  .gz-request-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 24px;
  }

  .gz-request-modal__box {
    padding: 56px 18px 24px;
  }

  .gz-request-modal__title {
    font-size: 36px;
  }

  .gz-request-modal__text {
    margin-bottom: 20px;
    font-size: 15px;
  }
}
