/*
 * app-safe.css — гигиена UX для WebApp (v2 — глобальный запрет выделения).
 *
 * ГЛОБАЛЬНО:
 *  • Всё содержимое: без выделения текста, без синих миганий, без drag,
 *    без long-press контекстного меню на iOS.
 *
 * ИСКЛЮЧЕНИЯ (выделение разрешено):
 *  • <input>, <textarea>, [contenteditable] — иначе не будет полей ввода.
 *  • Элементы с классом .selectable (для инвайт-кодов, ссылок и т.п.,
 *    где юзер должен уметь скопировать).
 */

html, body {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Наследование на всё содержимое. */
*, *::before, *::after {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Картинки/svg: без drag и без long-press-menu. */
img, svg, video {
    -webkit-user-drag: none;
       -moz-user-drag: none;
            user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

/* Поля ввода — выделение и native touch-callout всегда доступны. */
input, textarea, select,
[contenteditable="true"], [contenteditable=""] {
    -webkit-user-select: text !important;
       -moz-user-select: text !important;
        -ms-user-select: text !important;
            user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* Класс .selectable для явно копируемых блоков: инвайт-коды, ссылки,
   текст ответа и т.п. Применяется к элементу и всем детям. */
.selectable, .selectable * {
    -webkit-user-select: text !important;
       -moz-user-select: text !important;
        -ms-user-select: text !important;
            user-select: text !important;
    -webkit-touch-callout: default !important;
    cursor: text;
}
