/* ==========================================================================
   Модальное окно «Обратная связь»
   ========================================================================== */

.fb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.fb-modal-overlay.is-open { display: flex; }

.fb-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: fbModalIn .25s ease;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
}
@keyframes fbModalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fb-modal__top {
  padding: 28px 24px 0;
  overflow-y: auto;
  position: relative;
  z-index: 2;
}

.fb-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 3;
}
.fb-modal__close:hover { background: #f1f3f6; }
.fb-modal__close:active { transform: scale(.95); }
.fb-modal__close svg { display: block; width: 20px; height: 20px; }

.fb-modal__title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: #3E4653;
  position: relative;
  z-index: 2;
}

/* Поля формы */
.fb-field {
  position: relative;
  margin-bottom: 18px;
}
.fb-field__input,
.fb-field__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 14px 8px;
  font-size: 15px;
  color: #3E4653;
  background: #fff;
  border: 1px solid #BBC7D8;
  border-radius: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.fb-field__textarea {
  min-height: 110px;
  resize: vertical;
  padding-top: 18px;
}
.fb-field__input:focus,
.fb-field__textarea:focus {
  border-color: #3E4653;
  box-shadow: 0 0 0 3px rgba(62, 70, 83, .1);
}
.fb-field__label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #8a94a3;
  pointer-events: none;
  transition: all .18s ease;

  padding: 0 4px;
  z-index: 1;
}
.fb-field--textarea .fb-field__label {
  top: 22px;
  transform: none;
}
.fb-field:hover .fb-field__label,
.fb-field__input:focus + .fb-field__label,
.fb-field__input:not(:placeholder-shown) + .fb-field__label,
.fb-field__textarea:focus + .fb-field__label,
.fb-field__textarea:not(:placeholder-shown) + .fb-field__label {
  top: 0;
  font-size: 12px;
  color: #3E4653;
  transform: none;
}

.fb-field__input::placeholder,
.fb-field__textarea::placeholder { color: transparent; }

/* Нижний блок */
.fb-highlight {
  background: #EDF1F8;
  padding: 18px 24px 24px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

/* Чекбокс согласия */
.fb-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7484;
  position: relative;
  z-index: 1;
}
.fb-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.fb-checkbox__box {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #BBC7D8;
  border-radius: 5px;
  background: #fff;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color .2s;
}
.fb-checkbox__box::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #3E4653;
  border-radius: 2px;
  transform: scale(0);
  transition: transform .15s ease;
}
.fb-checkbox:hover .fb-checkbox__box { border-color: #3E4653; }
.fb-checkbox input:checked + .fb-checkbox__box { border-color: #3E4653; }
.fb-checkbox input:checked + .fb-checkbox__box::after { transform: scale(1); }
.fb-checkbox input:focus-visible + .fb-checkbox__box {
  box-shadow: 0 0 0 3px rgba(62, 70, 83, .2);
}
.fb-checkbox__text a {
  color: #3E4653;
  text-decoration: underline;
}
.fb-checkbox__text a:hover { text-decoration: none; }

.fb-personalInfo__error {
  color: #e04242;
  font-size: 12px;
  margin-bottom: 4px;
  display: none;
}
.fb-personalInfo__error.is-visible { display: block; }

/* Кнопка отправки */
.fb-submit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  background: #3E4653;
  border-radius: 10px;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, transform .15s;
  position: relative;
  z-index: 1;
  font-family: inherit;
  line-height: 1.2;
  margin-top: 6px;
}
.fb-submit:hover { background: #4c5564; }
.fb-submit:active { transform: scale(.98); }
.fb-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Экран успеха */
.fb-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 24px 40px;
  position: relative;
  z-index: 1;
}
.fb-success.is-visible { display: flex; }
.fb-success__icon {
  margin-top: 50px;
  display: block;
  width: 59px;
  height: 42px;
}
.fb-success__title {
  margin: 18px 0 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 22px;
  color: #64A12F;
  text-align: center;
}
.fb-success__text {
  margin: 30px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 21px;
  color: #3E4653;
  text-align: center;
}