/* ============================================================
   Защита от копирования контента
   ============================================================ */

/* Запрещаем выделение для всех элементов с классом protected
   (применяется на <body>). Поля ввода и контентные элементы,
   где выделение должно работать, разрешаются явно ниже. */
.protected,
.protected * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    -webkit-touch-callout: none;
}

/* Поля ввода — должны быть выделяемы и редактируемы */
.protected input,
.protected textarea,
.protected select,
.protected [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Запрет перетаскивания изображений */
.protected img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* ============================================================
   Водяной знак с username
   ============================================================ */
.watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    opacity: 0.06;
    overflow: hidden;
}

.watermark__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-30deg);
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    white-space: nowrap;
}

/* ============================================================
   Общий стиль
   ============================================================ */
body {
    min-height: 100vh;
}

/* На странице логина и админке водяной знак не нужен */
.no-watermark .watermark {
    display: none;
}
