* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.main__container {
  width: auto;
}

.form-container {
  max-width: 760px;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
}

.form-header {
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.form-header h1 {
  font-size: 22px;
  color: #009176;
  margin-bottom: 5px;
}

.form-header p {
  font-size: 14px;
  color: #4a5568;
}

.form-section {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  background-color: #fafbfc;
}

.form-section legend {
  font-weight: bold;
  color: #009176;
  padding: 0 8px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #2d3748;
}

.required {
  color: #e53e3e;
}

/* Общий базовый стиль для всех полей ввода, включая type="date" */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 16px !important; /* Отключает автозум в iOS Safari */
  background-color: #ffffff;
  color: #2d3748;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

textarea {
  height: auto;
  resize: vertical;
}

input:focus, 
select:focus, 
textarea:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

/* Загрузка файлов */
input[type="file"] {
  display: block;
  width: 100%;
  padding: 8px;
  background: #edf2f7;
  border: 1px dashed #cbd5e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.help-text {
  display: block;
  font-size: 12px;
  color: #718096;
  margin-top: 4px;
}

/* Кнопка отправки */
.btn-submit {
  width: 100%;
  background-color: #009176;
  color: white;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: #199899;
}

.btn-submit:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
}

/* Сообщения об ошибках / успехе */
.message-box {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
}

.message-box.success {
  background-color: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
  margin: 25px 0 0;
}

.message-box.error {
  background-color: #fed7d7;
  color: #742a2a;
  border: 1px solid #feb2b2;
  margin: 25px 0 0;
}

.captcha-wrapper {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

/* Красная подсветка незаполненных полей */
.input-error {
  border: 1px solid #dc3545 !important;
  background-color: #fff8f8 !important;
  outline: none;
}

/* Подсказки к полям */
.label-with-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #999;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}

.hint-text {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 13px;
  font-weight: normal;
  line-height: 1.4;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
  z-index: 10;
  text-align: left;
}

.hint-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
}

.hint-icon:hover .hint-text,
.hint-icon:focus .hint-text {
  opacity: 1;
  visibility: visible;
}

/* Специфический фикс выравнивания и иконки даты в iOS Safari */
input[type="date"] {
  min-height: 42px;
  line-height: 1.2;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  padding: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(0.3);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}