.contact {
  padding: 70px 60px 34px;
  background: #F4F9FF;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 40px;
}

.content {
  display: flex;
  justify-content: end;
  align-items: flex-start; /* Выравнивание элементов по верхнему краю */
  gap: 2rem;
  max-width: 100%;
}

.illustration {
  position: absolute;
  bottom: 43px;
  left: 0;
}

.form-container {
  flex: 1;
  max-width: 550px;
  padding-top: 40px;
  border: 1px solid #EBEBEB;
  border-radius: 15px;
  background: #fff;
  display: flex;
  flex-direction: column;
  /* height: 630px; Увеличенная высота для отображения строки */
  position: relative;
  /* overflow: hidden; Скрытие лишнего контента */
}

.form-toggle-btns {
  display: flex;
  margin: 0 50px;
}

.form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 11px 14px 11px;
  gap: 6px;
  background-color: #fff;
  border: 1px solid #E3F1FF;
  cursor: pointer;
  width: 50%;
  transition: background-color 0.3s ease;

  font-size: 16px;
  font-weight: 600;
  color: #559BED;
}

.organization-form-btn {
  border-radius: 15px 0 0 15px;
}

.form-btn:hover {
  background-color: #E3F1FF;
}

.organization-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-bottom: -3px;
}

.patient-form-btn {
  border-radius: 0 15px 15px 0;
}

.active-form-btn {
  background-color: #559BED;
  color: #fff;
  border: none;
}

.active-form-btn:hover {
  background-color: #3576c2;
}

.form-content {
  padding: 30px 50px;
}

.form-attention {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;

  font-size: 20px;
  font-weight: 700;
}

.form-container form::-webkit-scrollbar {
  display: none;
}

.form-container form {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.form-container form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-content label {
  display: inline-block;
  margin-top: 18px;
  font-weight: 600;
  font-size: 18px;
}

.form-content label:first-child {
  margin-top: 0;
}

.form-content input,
.form-content textarea,
.form-content .form-select {
  font-size: 16px;
  margin-top: 18px;
}

.form-content input::placeholder,
.form-content textarea::placeholder {
  color: #5B5B5B;
}

.form-footer {
  box-sizing: border-box;
  padding: 25px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #ddd;
}

.confirmation-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.form-footer input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 1px solid #A5B4CB;
  border-radius: 0.2rem;
  background-color: #fff;
  cursor: pointer;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  margin: 0;
}

.form-footer input[type="checkbox"]:hover {
  background-color: #F4F9FF;
}

/* Стили для состояния "отмечено" */
.form-footer input[type="checkbox"]:checked {
  background-color: #559bed !important;
  border-color: #559bed;
  background-image: url("../img/check.svg") !important;
  background-repeat: no-repeat;
  background-position: center;
}

.form-footer input[type="checkbox"]:checked:hover {
  background-color: #3576C2 !important;
  border-color: #3576C2;
}

.form-footer p {
  font-size: 14px;
  color: #5B5B5B;
  margin: 0; /* Убираем отступы */
  flex: 1; /* Текст занимает всё доступное пространство */
  position: relative;
}

.form-footer a {
  color: #007bff;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.footer-submit-btn {
  font-size: 16px;
  font-weight: 600;
  padding: 18px 30px 20px 30px;
  background-color: #559bed;
  color: #fff;
  border: none;
  border-radius: 2rem; /* Скругленные углы */
  cursor: pointer;
  white-space: nowrap; /* Запрет переноса текста */
  transition: background-color 0.3s ease;
}

.footer-submit-btn:hover {
  background-color: #3576C2;
}

.footer-submit-btn:disabled {
  background-color: #eff6ff;
  color: #a5b4cb;
}

input,
textarea,
.form-select-button,
.form-options-list {
  width: 100%;
  border: 1px solid #ebebeb;
  border-radius: 7px;
  padding: 14px 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  outline: none;
}

input:focus,
textarea:focus,
textarea:focus-within,
textarea:focus-visible,
.form-select-button:focus,
.form-select-button__active {
  background-color: #f7fcff !important;
  border: solid 1px #559bed;
}

textarea {
  min-height: 100px;
  resize: none;
}

.form-select {
  position: relative;
}

.form-select-button {
  position: relative;
  display: block;
  text-align: left;
  padding-right: 31px;
  background: url(../img/chevron-down-grey.svg) no-repeat right 13px center;
}

.form-select-input__hidden {
  display: none;
}

.form-options-list {
  display: none;
  position: absolute;
  left: 0;
  top: 54px;
  overflow: hidden;
  z-index: 1;
  padding: 0;
  background: #fff;
}

.form-options-list__visible {
  display: block;
}

.form-option {
  padding: 14px 13px;
  cursor: pointer;
}

.form-option:first-child {
  border-radius: 7px 7px 0 0;
}

.form-option:last-child {
  border-radius: 0 0 7px 7px;
}

.form-option:hover {
  background-color: #f7fcff;
}

.agreement {
  font-size: 0.875rem;
  margin-top: 1rem;
}

.agreement a {
  color: #007bff;
  text-decoration: none;
}

.agreement a:hover {
  text-decoration: underline;
}

.error-message {
  display: inline-block;
  margin: 5px 0 0 0;
}

@media screen and (max-width: 1200px) {
  .illustration {
    left: -100px;
    bottom: 10%;
  }
}

@media screen and (max-width: 980px) {
  .illustration {
    display: none;
  }

  .content {
    justify-content: center;
    gap: 0;
  }

  .form-container {
    width: 100%;
    margin: 0 auto;
  }
}

@media screen and (max-width: 750px) {
  .contact {
    padding: 40px 16px 0;
  }

  .form-container {
    height: 100%;
  }

  .form-btn img {
    display: none;
  }

  .contact .container h2 {
    font-size: 28px;
    margin-bottom: 28px;
  }

  .form-content {
    padding: 30px 24px;
  }

  .form-attention {
    font-size: 16px;
    margin-bottom: 0;
  }

  .form-content label {
    font-size: 14px;
  }

  .form-content input,
  .form-content textarea,
  .form-content .form-select {
    font-size: 14px;
    margin-top: 14px;
  }

  .form-footer {
    flex-direction: column;
    padding: 22px 24px;
    align-items: center;
    justify-content: center;
    gap: 15px;
  }

  .form-footer p {
    font-size: 12px;
  }
}
