/* SALUTS_GLOBAL_BROWSER_COMPAT_V1
   Базовый слой кроссбраузерной стабильности для Safari / Chrome.
   Не меняет фирменный стиль, только убирает дефолтные отличия браузеров.
*/

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
}

/* Safari часто добавляет свои системные стили интерактивным элементам */
button,
input,
textarea,
select {
  font-family: inherit !important;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  -webkit-appearance: none;
  appearance: none;
}

button,
a {
  -webkit-tap-highlight-color: rgba(252, 105, 103, .16);
}

/* Чтобы Safari не делал placeholder бледнее Chrome */
::placeholder {
  opacity: 1;
}

/* Медиа и изображения должны одинаково держать размеры */
img,
svg,
video,
canvas {
  max-width: 100%;
}

video {
  background: #000;
}

/* Фирменные кнопки Saluts: фиксируем цвет текста в Safari */
.create-btn,
.create-btn *,
.home-page .create-btn,
.home-page .create-btn *,
#create_project_form .create-btn,
#create_project_form .create-btn * {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

/* Кастомный фильтр "Способ создания видео" */
#mode_select_root,
#mode_select_root * {
  -webkit-font-smoothing: antialiased;
}

#mode_select_root button,
#mode_select_root .select-trigger,
#mode_select_root .select-option {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit !important;
}

/* Модальные окна и баннеры: Safari требует webkit-дубль */
.saluts-premium-banner-v4 {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.saluts-premium-banner-v4__dialog {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.saluts-premium-banner-v4__image {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Safari иногда иначе считает клики по абсолютным прозрачным кнопкам */
.saluts-premium-banner-v4__stay,
.saluts-premium-banner-v4__go {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto !important;
}

/* Убираем случайное системное выделение/обводки на кастомных кнопках */
.saluts-premium-banner-v4__stay:focus,
.saluts-premium-banner-v4__go:focus,
#mode_select_root button:focus {
  outline: none;
}

.saluts-premium-banner-v4__stay:focus-visible,
.saluts-premium-banner-v4__go:focus-visible,
#mode_select_root button:focus-visible {
  outline: 3px solid rgba(252, 105, 103, .28);
  outline-offset: 3px;
}

/* Safari-safe высота для экранов, где есть динамические панели браузера */
@supports (height: 100dvh) {
  .saluts-premium-banner-v4 {
    min-height: 100dvh;
  }
}

/* SALUTS_HOME_MAIN_SAFARI_WEIGHT_FIX_V1
   Safari-only правка весов на /home/main.
   Причина: Safari визуально утяжеляет Nunito 900.
   Не трогаем Chrome, авторизацию, редиректы, размеры блоков и загрузку шрифтов.
*/

@supports (background: -webkit-named-image(i)) {
  .home-page .hero-title,
  .home-page h1.hero-title {
    font-weight: 760 !important;
    font-variation-settings: "wght" 760 !important;
    -webkit-text-stroke-width: 0 !important;
  }

  .home-page .form-title {
    font-weight: 760 !important;
    font-variation-settings: "wght" 760 !important;
    -webkit-text-stroke-width: 0 !important;
  }

  .home-page .create-btn,
  .home-page .create-btn *,
  #create_project_form .create-btn,
  #create_project_form .create-btn * {
    font-weight: 760 !important;
    font-variation-settings: "wght" 760 !important;
    -webkit-text-stroke-width: 0 !important;
  }

  .home-page .field label,
  #create_project_form label {
    font-weight: 600 !important;
    font-variation-settings: "wght" 600 !important;
  }

  .home-page nav a,
  .home-page nav button,
  .home-page aside a,
  .home-page aside button,
  .home-page .sidebar a,
  .home-page .sidebar button,
  .home-page .side-nav a,
  .home-page .side-nav button,
  .home-page .topbar a,
  .home-page .topbar button,
  .home-page .home-header a,
  .home-page .home-header button {
    font-weight: 600 !important;
    font-variation-settings: "wght" 600 !important;
    -webkit-text-stroke-width: 0 !important;
  }
}

