/* Safari forms normalization
   Работает на iOS Safari и macOS Safari.
*/

/* 1) Общая нормализация внешнего вида (Safari) */
@supports (-webkit-appearance: none) {

  /* Текстовые поля и textarea (не трогаем checkbox/radio/file) */
  html body input:not([type]),
  html body input[type="text"],
  html body input[type="search"],
  html body input[type="password"],
  html body input[type="number"],
  html body input[type="email"],
  html body input[type="tel"],
  html body input[type="url"],
  html body textarea {
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
    border-radius: 10px; /* если в проекте другие скругления - подставьте ваши */
    line-height: 1.5;
  }

  /* select в закрытом состоянии делаем предсказуемым */
  html body select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
    border-radius: 10px; /* под стиль проекта */
    line-height: 1.5;

    /* ВАЖНО: часто background у select задается шортхендом в app.css,
       поэтому ставим !important на картинку стрелки и позиционирование */
    padding-right: 40px !important;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px 14px !important;
  }

  /* Убираем стандартные iOS декорации у search */
  html body input[type="search"]::-webkit-search-decoration,
  html body input[type="search"]::-webkit-search-cancel-button,
  html body input[type="search"]::-webkit-search-results-button,
  html body input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
  }
}

/* 2) iOS: предотвращаем zoom при фокусе (font-size >= 16px обязательно)
   Делаем максимально "пробивным", потому что часто font-size задается более специфично.
*/
@supports (-webkit-touch-callout: none) {
  html { -webkit-text-size-adjust: 100%; }

  html body input:not([type]),
  html body input[type="text"],
  html body input[type="search"],
  html body input[type="password"],
  html body input[type="number"],
  html body input[type="email"],
  html body input[type="tel"],
  html body input[type="url"],
  html body textarea,
  html body select {
    font-size: 16px !important;
  }
}
