/* ============================================
   Убираем дефолтные стили браузеров
   ============================================ */

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

/* Убираем отступы */
* {
    margin: 0;
    padding: 0;
}

/* Убираем стили списков */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Базовые настройки body */
html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Медиа элементы */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Формы */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Убираем стили кнопок */
button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Убираем outline при клике (добавим свой позже) */
button:focus,
a:focus {
    outline: none;
}

/* Ссылки */
a {
    text-decoration: none;
    color: inherit;
}

/* Параграфы и заголовки */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Таблицы */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Убираем стрелки у input[type="number"] */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;  /* Стандартное свойство */
}

/* Убираем автозаполнение цвет в Chrome */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--color-bg-primary) inset;
    -webkit-text-fill-color: var(--color-text-primary);
}

/* Accessibility: убираем анимации для тех, кто их отключил */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}