/* ========================================================================== */
/* Contacts page                                                              */
/* Contact channels, messenger links, location info and contact form.          */
/* ========================================================================== */

/* Page */

.inner-page--contacts .inner-page-head { padding-bottom: 28px; }
.inner-page--contacts .inner-page-head__copy { max-width: none; }
.inner-page--contacts .inner-page-head__copy h1 { margin-bottom: 0; }

.contact-page {
  padding: 30px 0 82px;
  background: var(--c-white);
}

.contact-page__grid {
  display: grid;
  gap: 42px;
  max-width: 1180px;
}

/* Contact details */

.contact-details { min-width: 0; }

/* Phone */

.contact-phone {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.contact-phone__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--c-indigo-50);
  color: var(--c-indigo-600);
}

.contact-phone__icon .icon { width: 24px; height: 24px; }

.contact-phone__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.contact-phone__label {
  color: var(--c-slate-500);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.3;
}

.contact-phone__number {
  width: fit-content;
  color: var(--c-slate-950);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.25;
  transition: color 140ms var(--ease);
}

.contact-phone__number:hover { color: var(--c-indigo-600); }

/* Messengers */

.contact-messengers {
  margin-top: 18px;
  padding-left: 70px;
}

.contact-messengers__label {
  display: block;
  margin-bottom: 10px;
  color: var(--c-slate-500);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.3;
}

.contact-messenger-list {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-messenger {
  min-width: 56px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--c-slate-500);
  text-decoration: none;
}

.contact-messenger__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-slate-100);
  border-radius: 14px;
  background: var(--c-white);
  color: var(--c-indigo-600);
  transition:
    border-color 140ms var(--ease),
    box-shadow 140ms var(--ease),
    transform 140ms var(--ease);
}

.contact-messenger__icon img {
  width: 23px;
  height: 23px;
  display: block;
}

.contact-messenger:nth-child(2) .contact-messenger__icon img,
.contact-messenger:nth-child(3) .contact-messenger__icon img {
  width: 22px;
  height: 22px;
}

.contact-messenger__name {
  color: var(--c-slate-500);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 140ms var(--ease);
}

.contact-messenger:hover .contact-messenger__icon,
.contact-messenger:focus-visible .contact-messenger__icon {
  border-color: var(--c-indigo-200);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .10);
  transform: translateY(-1px);
}

.contact-messenger:hover .contact-messenger__name,
.contact-messenger:focus-visible .contact-messenger__name {
  color: var(--c-indigo-600);
}

.contact-messenger:focus-visible { outline: none; }

/* Location and service info */

.contact-info-list {
  display: grid;
  margin-top: 34px;
  border-top: 1px solid var(--c-slate-100);
  border-bottom: 1px solid var(--c-slate-100);
}

.contact-info-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 20px 0;
}

.contact-info-row + .contact-info-row { border-top: 1px solid var(--c-slate-100); }

.contact-info-row__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--c-indigo-50);
  color: var(--c-indigo-600);
}

.contact-info-row__icon .icon { width: 22px; height: 22px; }
.contact-info-row > div { min-width: 0; padding-top: 2px; }

.contact-info-row strong {
  display: block;
  color: var(--c-slate-900);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.contact-info-row span:not(.contact-info-row__icon) {
  display: block;
  margin-top: 5px;
  color: var(--c-slate-700);
  font-size: 15px;
  line-height: 1.55;
}

.contact-info-row small {
  display: block;
  margin-top: 5px;
  color: var(--c-slate-500);
  font-size: 13px;
  line-height: 1.55;
}

/* Form card */

.contact-form-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--c-slate-100);
  border-radius: var(--radius-20);
  background: var(--c-white);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .045);
}

.contact-form-card h2 {
  margin: 0 0 22px;
  color: var(--c-slate-950);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
}

.contact-form { display: grid; gap: 16px; }
.contact-form__row { display: grid; gap: 16px; }

/* Fields */

.contact-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.contact-field > span:first-child {
  color: var(--c-slate-700);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.3;
}

.contact-field em {
  margin-left: 5px;
  color: var(--c-slate-400);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--c-slate-200);
  border-radius: var(--radius-12);
  background: var(--c-white);
  color: var(--c-slate-900);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition:
    border-color 140ms var(--ease),
    box-shadow 140ms var(--ease),
    background 140ms var(--ease);
}

.contact-field input,
.contact-field select {
  height: 52px;
  padding: 0 15px;
}

.contact-field textarea {
  min-height: 132px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.55;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--c-slate-400);
  opacity: 1;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--c-indigo-400);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .09);
}

.contact-field.is-invalid input,
.contact-field.is-invalid select,
.contact-field.is-invalid textarea,
.contact-field input.is-invalid,
.contact-field select.is-invalid,
.contact-field textarea.is-invalid,
.phone-input__number.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .07);
}

.contact-field--phone { gap: 7px; }
.contact-field--company[hidden] { display: none; }

/* Field help */

.contact-field__help {
  display: block;
  margin-top: -1px;
  color: var(--c-slate-400);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
}

/* Field errors */

.contact-field__error {
  display: block;
  margin-top: 6px;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
}

.contact-field__error:empty { display: none; }

/* Select */

.contact-select {
  position: relative;
  display: block;
}

.contact-select select {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.contact-select .icon {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  color: var(--c-slate-500);
  pointer-events: none;
  transform: translateY(-50%);
}

/* Personal data consent */

.contact-consent { margin-top: 2px; }

.contact-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 44px;
  cursor: pointer;
}

.contact-consent__label input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--c-indigo-600);
  cursor: pointer;
}

.contact-consent__text {
  color: var(--c-slate-400);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.contact-consent__text a {
  color: var(--c-slate-500);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 140ms var(--ease);
}

.contact-consent__text a:hover { color: var(--c-slate-700); }
.contact-consent .contact-field__error { margin-top: 7px; }

/* Form footer */

.contact-form__footer {
  display: grid;
  gap: 11px;
  margin-top: 2px;
}

.contact-form__submit {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-12);
  background: var(--c-indigo-600);
  color: var(--c-white);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  transition:
    background 140ms var(--ease),
    transform 140ms var(--ease);
}

.contact-form__submit .icon { width: 18px; height: 18px; }
.contact-form__submit:hover { background: var(--c-indigo-700); }
.contact-form__submit:active { transform: translateY(1px); }

.contact-form__submit:disabled {
  opacity: .65;
  cursor: wait;
}

/* Status */

.contact-form__status {
  min-height: 0;
  margin: 0;
  color: var(--c-slate-500);
  font-size: 12px;
  line-height: 1.55;
}

.contact-form__status:empty { display: none; }
.contact-form__status.is-success { color: #15803d; }
.contact-form__status.is-error { color: #b91c1c; }
.contact-form__status.is-info { color: var(--c-slate-600); }

/* Honeypot */

.contact-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Tablet */

@media (min-width: 768px) {
  .inner-page--contacts .inner-page-head { padding-bottom: 34px; }

  .contact-page {
    padding-top: 40px;
    padding-bottom: 96px;
  }

  .contact-page__grid {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.08fr);
    align-items: start;
    gap: 56px;
  }

  .contact-phone {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
  }

  .contact-phone__icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .contact-phone__icon .icon { width: 26px; height: 26px; }
  .contact-phone__number { font-size: 24px; }
  .contact-messengers { padding-left: 76px; }

  .contact-messenger__icon {
    width: 50px;
    height: 50px;
  }

  .contact-messenger__icon img {
    width: 24px;
    height: 24px;
  }

  .contact-messenger:nth-child(2) .contact-messenger__icon img,
  .contact-messenger:nth-child(3) .contact-messenger__icon img {
    width: 23px;
    height: 23px;
  }

  .contact-form-card {
    padding: 30px 32px 32px;
    border-radius: var(--radius-24);
  }

  .contact-form-card h2 {
    margin-bottom: 24px;
    font-size: 30px;
  }

  .contact-field input,
  .contact-field select {
    height: 54px;
  }

  .contact-form__submit {
    width: fit-content;
    min-width: 180px;
  }
}

/* Desktop */

@media (min-width: 1100px) {
  .contact-page {
    padding-top: 46px;
    padding-bottom: 108px;
  }

  .contact-page__grid {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.08fr);
    gap: 64px;
  }

  .contact-phone__number { font-size: 26px; }

  .contact-info-row strong,
  .contact-info-row span:not(.contact-info-row__icon) {
    font-size: 15.5px;
  }

  .contact-form-card { padding: 34px 36px 36px; }
}

/* Mobile */

@media (max-width: 767px) {
  .contact-page {
    padding-top: 26px;
    padding-bottom: 82px;
  }

  .contact-page__grid { gap: 38px; }
  .contact-phone__number { font-size: 22px; }
  .contact-messengers { padding-left: 70px; }
  .contact-info-list { margin-top: 30px; }
  .contact-info-row { padding: 18px 0; }

  .contact-form-card {
    padding: 20px;
    box-shadow: none;
  }

  .contact-form-card h2 { font-size: 26px; }

  .contact-consent__label { gap: 10px; }

  .contact-consent__label input {
    width: 22px;
    height: 22px;
    margin-top: 0;
  }

  .contact-consent__text {
    font-size: 11px;
    line-height: 1.6;
  }
}

/* Small mobile */

@media (max-width: 430px) {
  .contact-phone {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 13px;
  }

  .contact-phone__icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .contact-phone__icon .icon { width: 23px; height: 23px; }
  .contact-phone__number { font-size: 20px; }
  .contact-messengers { padding-left: 63px; }
  .contact-messenger-list { gap: 9px; }
  .contact-messenger { min-width: 52px; }

  .contact-messenger__icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .contact-messenger__icon img {
    width: 22px;
    height: 22px;
  }

  .contact-messenger:nth-child(2) .contact-messenger__icon img,
  .contact-messenger:nth-child(3) .contact-messenger__icon img {
    width: 21px;
    height: 21px;
  }

  .contact-messenger__name { font-size: 10.5px; }

  .contact-info-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
  }

  .contact-info-row__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .contact-info-row__icon .icon { width: 20px; height: 20px; }

  .contact-form-card {
    padding: 18px;
    border-radius: var(--radius-16);
  }
}
