/* ---------------------------------------------------------------------------
   Contacts page — ТЗ §5: форма обратной связи, кликабельные tel: / mailto:,
   ссылки на мессенджеры.

   Everything is scoped under .cf (contact form) or .contacts-info-card__link,
   which is a NEW class added by tools/gen_contacts.py — the site's own
   .contacts-info-card is not restyled. fidelity_check.py fails the build if any
   selector from style.css is redefined.

   Values are the measured design system: panel #2b3141, page #3a4257,
   primary #ed1a20, radius 10px on controls / 20px on panels, 0.35s ease.
--------------------------------------------------------------------------- */

/* A phone number that is now a link must not look like a different phone
   number: same colour and weight as the text it replaced, and it announces
   itself on hover the way every other link on the site does. */
.contacts-info-card__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.35s ease;
}

@media (max-width: 48rem) {
  .contacts-info-card__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

.contacts-info-card__link:hover,
.contacts-info-card__link:focus-visible {
  color: #ed1a20;
}

/* Messengers sit with the existing socials. The site's icon set has no Telegram
   or WhatsApp glyph and п. 2.2 договора forbids drawing new ones, so these are
   text links — the same decision already taken for «кондиционер» and «Wi-Fi»
   on the rental page. */
/* Scoped under the site's own container on purpose. style.css sizes every link
   in that block as a 48×48 circle for the Facebook and Instagram glyphs; a text
   link inherits that and the two words collapse into "TelegramWhatsApp". The
   selector names our class last, so it can only reach an element we added. */
.contacts-page__socials .contacts-page__messenger {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 0.25rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9375rem;
  transition:
    border-color 0.35s ease,
    color 0.35s ease;
}

.contacts-page__socials .contacts-page__messenger:hover,
.contacts-page__socials .contacts-page__messenger:focus-visible {
  border-color: #ed1a20;
  color: #ed1a20;
}

/* ------------------------------------------------------------ the form */

.cf {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background-color: #2b3141;
  border-radius: 20px;
}

.cf__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.cf__lead {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 40rem;
}

/* One column, then the three short fields in one row. auto-fit left Email alone
   under the other two up to 875 px, a field wide and a half empty. */
.cf__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.cf-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.cf-field--wide {
  grid-column: 1 / -1;
}

.cf-field__label {
  font-size: 0.875rem;
  color: #cfd5e7;
}

.cf-field__req {
  color: #ed1a20;
  font-style: normal;
  font-size: 0.8125rem;
}

/* 0.6, not 0.45: 3.9:1 on the panel for 13 px text, below AA. */
.cf-field__opt {
  color: rgba(255, 255, 255, 0.6);
  font-style: normal;
  font-size: 0.8125rem;
}

.cf-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: #3a4257;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.8125rem 0.9375rem;
  transition:
    border-color 0.35s ease,
    background-color 0.35s ease;
}

.cf-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.cf-input:focus {
  outline: none;
  border-color: #ed1a20;
}

.cf-input--area {
  resize: vertical;
  min-height: 6rem;
}

/* Marked by leadform.js when validation fails before sending. */
.cf-input.is-invalid {
  border-color: #ed1a20;
  background-color: rgba(237, 26, 32, 0.08);
}

.cf__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* The result of sending, success or failure, in the same place both times: a
   message that moves is a message that gets missed. Above the button, as in the
   tour form: below it the text landed under the edge of a phone screen, and a
   failure then changed nothing the visitor could see. The pale red is the tour
   form's too; the brand red is under 3:1 on this panel. */
.cf__message {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.25rem;
  color: #ffb3b5;
  font-size: 0.9375rem;
}

.cf__message.is-ok {
  color: #34c759;
}

/* 48.0625rem — точное дополнение к 48rem, которым пользуется
   этот же файл до перестановки: нет ширины, где сработали бы
   оба правила или ни одного. */
@media (min-width: 48.0625rem) {
  .cf {
    padding: 1.75rem;
  }

  .cf__form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cf__title {
    font-size: 1.5rem;
  }
}

