.fhg-mobile-contacts {
  display: none;
}

body.fhg-consult-open {
  overflow: hidden;
}

.fhg-consult-modal {
  position: fixed;
  z-index: 1000001;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px !important;
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, visibility .2s ease;
}

.fhg-consult-modal[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fhg-consult-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 48, .76);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.fhg-consult-modal__dialog {
  position: relative;
  width: min(100%, 560px);
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px !important;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 21, 48, .3);
  color: #14213d;
}

.fhg-consult-modal__close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f7f1ec;
  color: #14213d;
  font: 400 30px/36px Arial, sans-serif;
  cursor: pointer;
}

.fhg-consult-modal__eyebrow {
  margin: 0 46px 5px 0 !important;
  color: #bd8256;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fhg-consult-modal__title {
  margin: 0 46px 8px 0 !important;
  color: #14213d;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.fhg-consult-modal__lead {
  margin: 0 0 24px !important;
  color: #657086;
  font-size: 15px;
  line-height: 1.45;
}

.fhg-consult-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fhg-consult-form__field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #14213d;
  font-size: 14px;
  font-weight: 600;
}

.fhg-consult-form__field--full {
  grid-column: 1 / -1;
}

.fhg-consult-form__field b {
  color: #bd8256;
}

.fhg-consult-form__field input,
.fhg-consult-form__field select {
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  padding: 0 15px;
  border: 1px solid #d9dde6;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: #14213d;
  font: 400 15px/1.3 inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.fhg-consult-form__field input:focus,
.fhg-consult-form__field select:focus {
  border-color: #bd8256;
  box-shadow: 0 0 0 3px rgba(189, 130, 86, .15);
}

.fhg-consult-choice {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #14213d;
}

.fhg-consult-choice legend {
  width: auto !important;
  margin: 0 0 7px !important;
  padding: 0 !important;
  color: #14213d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.fhg-consult-choice legend b {
  color: #bd8256;
}

.fhg-consult-choice__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fhg-consult-choice__options label {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.fhg-consult-choice__options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fhg-consult-choice__options span {
  display: flex;
  min-height: 52px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border: 1px solid #d9dde6;
  border-radius: 13px;
  background: #fff;
  color: #14213d;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.fhg-consult-choice__options input:checked + span {
  border-color: #bd8256;
  background: #bd8256;
  color: #fff;
  box-shadow: 0 4px 12px rgba(189, 130, 86, .22);
}

.fhg-consult-choice__options input:focus-visible + span {
  border-color: #bd8256;
  box-shadow: 0 0 0 3px rgba(189, 130, 86, .15);
}

.fhg-consult-form__consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #657086;
  font-size: 12px;
  line-height: 1.4;
}

.fhg-consult-form__consent input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #bd8256;
}

.fhg-consult-form__consent a {
  color: #bd8256;
  text-decoration: underline;
}

.fhg-consult-form__submit {
  grid-column: 1 / -1;
  min-height: 56px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: #bd8256;
  color: #fff;
  font: 700 15px/1.2 inherit;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.fhg-consult-form__submit:hover,
.fhg-consult-form__submit:focus-visible {
  background: #a96f48;
  outline: none;
}

.fhg-consult-form__submit:active {
  transform: translateY(1px);
}

@media (max-width: 620px) {
  .fhg-consult-modal {
    align-items: flex-end;
    padding: 12px 12px calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .fhg-consult-modal__dialog {
    max-height: calc(100vh - 104px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 104px - env(safe-area-inset-bottom, 0px));
    padding: 26px 20px 22px !important;
    border-radius: 20px;
    overscroll-behavior: contain;
  }

  .fhg-consult-modal__title {
    font-size: 27px;
  }

  .fhg-consult-modal__lead {
    margin-bottom: 18px !important;
  }

  .fhg-consult-form {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .fhg-consult-form__field--full,
  .fhg-consult-choice,
  .fhg-consult-form__consent,
  .fhg-consult-form__submit {
    grid-column: auto;
  }

  .fhg-consult-choice__options span {
    min-height: 54px;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-bottom: 88px;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .fhg-mobile-contacts {
    position: fixed;
    z-index: 999999;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 70px;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    border-top: 2px solid #bd8256;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -7px 24px rgba(20, 33, 61, .16);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
  }

  .fhg-mobile-contacts__item {
    display: flex;
    min-width: 0;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-radius: 12px;
    color: #14213d;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .18s ease, background-color .18s ease, transform .18s ease;
  }

  .fhg-mobile-contacts__item + .fhg-mobile-contacts__item {
    border-left: 1px solid rgba(20, 33, 61, .1);
    border-radius: 0 12px 12px 0;
  }

  .fhg-mobile-contacts__item svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
  }

  .fhg-mobile-contacts__item:hover,
  .fhg-mobile-contacts__item:focus-visible,
  .fhg-mobile-contacts__item:active {
    color: #bd8256;
    background: #f8f3ee;
    outline: none;
  }

  .fhg-mobile-contacts__item:active {
    transform: translateY(1px);
  }
}

@media (min-width: 768px) {
  .fhg-mobile-contacts {
    display: none !important;
  }
}
