/* 1. Fonts and shared foundations */

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/02-Gilroy-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}


@font-face {
  font-family: "Gilroy";
  src: url("../fonts/04-Gilroy-SemiBold.woff") format("woff");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}


.contact-modal[hidden],
.contact-modal__form[hidden],
.contact-modal__choice[hidden],
.contact-modal__group[hidden] {
  display: none;
}

.contact-modal {
  --radius-block: 20px;
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  font: 400 16px/1.55 Gilroy, Arial, sans-serif;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.contact-modal *, .contact-modal *::before, .contact-modal *::after {
  box-sizing: border-box;
}

.contact-modal button, .contact-modal a {
  -webkit-tap-highlight-color: transparent;
}

.contact-modal svg {
  flex-shrink: 0;
}

.contact-modal :focus-visible {
  outline: 2px solid #ffd044;
  outline-offset: 4px;
}

.contact-modal .contact-modal__field:focus-visible,
.contact-modal .contact-modal__phone-input:focus-visible {
  outline: 0;
}

.contact-modal__dialog {
  position: relative;
  width: min(100%, 460px);
  height: 460px;
  max-height: calc(100vh - 48px);
  padding: 30px 40px;
  border-radius: var(--radius-block);
  border: 1px solid #2b3040;
  color: #f5f5f7;
  background: #171a24;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
  overflow: visible;
}

.contact-modal__close {
  position: absolute;
  z-index: 10;
  top: 30px;
  right: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #f5f5f7;
  background: transparent;
  font: 400 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.contact-modal__close:hover {
  background: #252a39;
}

.contact-modal__choice, .contact-modal__form {
  min-height: 100%;
}

.contact-modal__choice {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-modal__choice-copy {
  transform: translateY(29px);
}

.contact-modal__title {
  max-width: 340px;
  margin: 0;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  line-height: 1.12;
}

.contact-modal__description {
  margin: 14px 0 28px;
  color: #a6aab5;
  font-size: 16px;
  line-height: 1.5;
}

.contact-modal__options {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.contact-modal__option,
.contact-modal__submit,
.contact-modal__field,
.contact-modal__phone {
  width: 100%;
  height: 60px;
  min-height: 60px;
}

.contact-modal__option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 30px;
  color: #fff;
  font: 600 16px/1 Gilroy, Arial, sans-serif;
  cursor: pointer;
}

.contact-modal__option svg {
  width: 20px;
  height: 20px;
}

.contact-modal__option svg path {
  fill: currentColor;
}

.contact-modal__option--telegram {
  background: #2aabee;
}

.contact-modal__option--whatsapp {
  background: #25d366;
}

.contact-modal__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-modal__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 32px;
  margin: 0;
}

.contact-modal__back {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0;
  border: 0;
  color: #a6aab5;
  background: transparent;
  font: 400 14px/1 Gilroy, Arial, sans-serif;
  cursor: pointer;
}

.contact-modal__group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-modal__head + .contact-modal__group {
  margin-top: 36px;
}

.contact-modal__group[data-telegram],
.contact-modal__group[data-whatsapp],
.contact-modal__consent-wrap {
  transform: translateY(16px);
}

.contact-modal__group:has(.contact-modal__phone.is-open) {
  z-index: 20;
}

.contact-modal__consent-wrap {
  position: relative;
}

.contact-modal__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.contact-modal__field {
  padding: 0 18px;
  border: 1px solid #343949;
  border-radius: var(--radius-block);
  outline: 0;
  color: #f5f5f7;
  background: #0f121b;
  font: 400 16px/1 Gilroy, Arial, sans-serif;
}

.contact-modal__field::placeholder, .contact-modal__phone-input::placeholder {
  color: #737987;
}

.contact-modal__field:focus, .contact-modal__phone:focus-within {
  border-color: #ffd044;
}

.contact-modal__phone {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #343949;
  background: #0f121b;
  border-radius: var(--radius-block);
}

.contact-modal__country {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 58px;
  padding: 0 0 0 16px;
  border: 0;
  color: #f5f5f7;
  background: transparent;
  font: 400 16px/1 Gilroy, Arial, sans-serif;
  cursor: pointer;
}

.contact-modal__country-arrow {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid #f5f5f7;
}

.contact-modal__phone.is-open .contact-modal__country-arrow {
  transform: rotate(180deg);
}

.contact-modal__phone-input {
  min-width: 0;
  flex: 1;
  height: 58px;
  padding: 0 16px 0 8px;
  border: 0;
  outline: 0;
  color: #f5f5f7;
  background: transparent;
  font: 400 16px/1 Gilroy, Arial, sans-serif;
}

.contact-modal__countries {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: min(198px, calc(100vh - 48px));
  overflow: auto;
  padding: 8px 16px;
  border: 1px solid #343949;
  border-radius: var(--radius-block);
  background: #171a24;
  box-shadow: 0 16px 35px rgba(0, 0, 0, .38);
}

.contact-modal__phone.is-open .contact-modal__countries {
  display: block;
}

.contact-modal__countries--up {
  top: auto;
  bottom: calc(100% + 8px);
}

.contact-modal__country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid #2b3040;
  color: #f5f5f7;
  background: transparent;
  font: 400 14px/1 Gilroy, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.contact-modal__country-option b {
  margin-left: auto;
  color: #a6aab5;
  font-weight: 400;
}

.contact-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  color: #a6aab5;
  font-size: 12px;
  line-height: 1.45;
}

.contact-modal__consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #ffd044;
}

.contact-modal__consent a {
  color: inherit;
  text-decoration: none;
}

.contact-modal__submit {
  margin-top: 0;
  border: 1px solid #ffd044;
  border-radius: 30px;
  color: #05070d;
  background: #ffd044;
  font: 600 16px/1 Gilroy, Arial, sans-serif;
  cursor: pointer;
  transform: translateY(32px);
}

.contact-modal__submit:hover {
  border-color: #ffe078;
  background: #ffe078;
}

.contact-modal__error {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 50%;
  display: none;
  width: max-content;
  max-width: min(100%, 340px);
  margin: 0;
  padding: 6px 9px;
  border-radius: var(--radius-block);
  color: #ffb3b3;
  background: #25202a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
  font: 400 12px/1.35 Gilroy, Arial, sans-serif;
  pointer-events: none;
  transform: translateX(-50%);
}

.contact-modal__error:not(:empty) {
  display: block;
}

.contact-modal__group:has(.contact-modal__error:not(:empty)),
.contact-modal__consent-wrap:has(.contact-modal__error:not(:empty)) {
  z-index: 6;
}

.contact-modal__consent-wrap .contact-modal__error {
  top: calc(100% + 4px);
}

.contact-modal__field.is-invalid, .contact-modal__phone.is-invalid {
  border-color: #d96b6b;
}

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

[data-contact-open] {
  cursor: pointer;
}

@media (max-width: 520px) {
  .contact-modal {
    padding: 12px;
  }
  .contact-modal__dialog {
    height: 450px;
    max-height: calc(100vh - 24px);
    padding: 26px 22px 24px;
  }
  .contact-modal__close {
    top: 26px;
    right: 18px;
  }
  .contact-modal__head + .contact-modal__group {
    margin-top: 30px;
  }
}
