/* Свои формы вместо конструкторских. Оформление под фирменный стиль Спринта. */
.f-form {
  --f-brand: #f48519;
  --f-brand-dark: #d96f0c;
  --f-line: #c7c7c7;
  --f-err: #d33a2c;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 460px;
}

.f-row { position: relative; }

/* заголовок формы */
.f-head { margin-bottom: 2px; }

.f-title {
  display: block;
  font-size: 21px;
  font-weight: 700;
  line-height: 26px;
  color: #16181a;
}

.f-sub {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  color: #5c6166;
}

/* рисунок к форме */
.f-art {
  width: 96px;
  height: 72px;
  margin-bottom: 4px;
}

.f-art svg { display: block; width: 100%; height: 100%; }

/* формы с рисунком ставят его рядом с заголовком */
.f-form--geo,
.f-form--price { position: relative; padding-top: 4px; }

.f-form--geo .f-art,
.f-form--price .f-art {
  position: absolute;
  top: 0;
  right: 0;
  width: 84px;
  height: 63px;
  margin: 0;
  opacity: .9;
  pointer-events: none;
}

.f-form--geo .f-head,
.f-form--price .f-head { padding-right: 96px; }

@media (max-width: 480px) {
  .f-form--geo .f-art,
  .f-form--price .f-art { width: 64px; height: 48px; }
  .f-form--geo .f-head,
  .f-form--price .f-head { padding-right: 74px; }
  .f-title { font-size: 19px; line-height: 24px; }
}

.f-form input[type="text"],
.f-form input[type="tel"],
.f-form input[type="email"],
.f-form textarea {
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  font: inherit;
  font-size: 16px;
  color: #16181a;
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 10px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.f-form textarea { min-height: 96px; resize: vertical; }

.f-form input::placeholder,
.f-form textarea::placeholder { color: #9aa0a6; }

.f-form input:focus,
.f-form textarea:focus {
  border-color: var(--f-brand);
  box-shadow: 0 0 0 3px rgba(244, 133, 25, .18);
}

.f-form .f-err { border-color: var(--f-err); }

.f-hint {
  display: block;
  min-height: 16px;
  margin: 4px 2px 0;
  font-size: 13px;
  line-height: 16px;
  color: var(--f-err);
}

/* согласие на обработку данных */
.f-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 18px;
  color: #5c6166;
}

.f-agree input { margin-top: 1px; width: 16px; height: 16px; accent-color: var(--f-brand); flex: none; }
.f-agree a { color: inherit; text-decoration: underline; }

/* кнопка */
.f-submit {
  min-height: 56px;
  padding: 16px 28px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  background: var(--f-brand);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}

.f-submit:hover { background: var(--f-brand-dark); }
.f-submit:active { transform: scale(.985); }
.f-submit:disabled { opacity: .65; cursor: default; }

.f-error { min-height: 18px; font-size: 14px; color: var(--f-err); }

/* сообщение об отправке */
.f-done {
  padding: 22px 20px;
  font-size: 17px;
  line-height: 24px;
  color: #16181a;
  text-align: center;
  background: #fff;
  border: 1px solid var(--f-line);
  border-radius: 10px;
}

.f-done b { display: block; margin-bottom: 6px; font-size: 19px; color: var(--f-brand); }

/* всплывающее окно с формой */
.f-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.f-modal[hidden] { display: none; }

.f-modal__back {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  animation: f-fade .2s ease;
}

.f-modal__box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 26px 26px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
  animation: f-rise .28s cubic-bezier(.16, 1, .3, 1);
}

.f-modal__box .f-form { max-width: none; }

.f-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 26px;
  line-height: 1;
  color: #8a9096;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.f-modal__close:hover { color: #16181a; background: #f1f2f4; }

@keyframes f-fade { from { opacity: 0; } }
@keyframes f-rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 480px) {
  .f-modal { padding: 12px; }
  .f-modal__box { padding: 24px 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .f-form input, .f-form textarea, .f-submit { transition: none; }
  .f-modal__back, .f-modal__box { animation: none; }
}
