/* ==========================================
   TOUCH TARGET STYLES (WCAG 2.5.5)
   Минимум 44×44px для всех интерактивных элементов
   ========================================== */

/* ✅ Кнопки */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
a.button,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
}

/* Для кнопок, которые явно нужны 44px */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
}

/* ==========================================
   LINK & INTERACTIVE ELEMENTS
   ========================================== */

a {
  /* Если ссылка маленькая, увеличить padding для touch target */
  display: inline-block;
  padding: 4px 0;  /* Минимальный padding для touch area */
}

/* Для ссылок, которые нужны как кнопки */
a.link-interactive,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
}

/* ==========================================
   FORM INPUTS
   ========================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea,
select {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;  /* Важно для iOS: предотвращает zoom при фокусе */
}

/* Для smaller inputs (если нужно) */
.input-sm {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
}

/* ==========================================
   CHECKBOX & RADIO
   ========================================== */

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Увеличить click area для чекбокса */
.checkbox-wrapper,
.radio-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
}

/* ==========================================
   SPACING BETWEEN TOUCH TARGETS
   WCAG 2.5.5: Минимум 8px между элементами
   ========================================== */

/* Группа кнопок */
.button-group,
.btn-group {
  display: flex;
  gap: 12px;  /* 12px >= 8px */
  flex-wrap: wrap;
}

/* Горизонтальное расстояние */
.btn + .btn,
button + button,
input[type="button"] + input[type="button"] {
  margin-left: 8px;
}

/* Вертикальное расстояние */
.button-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================
   ICON BUTTONS
   ========================================== */

.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

/* ==========================================
   MOBILE CONSIDERATIONS
   ========================================== */

@media (max-width: 768px) {
  /* На мобильных все интерактивные элементы должны быть >= 44px */
  .btn,
  button,
  input[type="button"],
  a.btn {
    min-height: 48px;
    min-width: 48px;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  /* Увеличить inputs для лучшего тача */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
  }
}

/* ==========================================
   TESTING: Визуально показать touch targets
   (удалить в production)
   ========================================== */

/* 
body *:not(script) {
  outline: 1px solid rgba(255, 0, 0, 0.1);
}

.btn,
button,
input[type="button"],
a.btn {
  outline: 2px dashed rgba(0, 82, 204, 0.3) !important;
  outline-offset: -1px;
}
*/
