*,
*::before,
*::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    font-family: Montserrat, sans-serif;
    font-weight: 500;
    color: #27374D;
}

html {
    font-size: 16px;
}


/* 1. Сброс базовых стилей и запрет прокрутки */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Запрет прокрутки всей страницы */
}

header {
    position: fixed;
}

.adminMain {
    outline: 1px solid red;
    margin-top: 72px; /* Должен быть равен высоте хедера */
    margin-left: 333px;
    width: calc(100% - 333px);
    padding-top: 31px;

    /* 1. Задаем высоту: 100% высоты окна (100vh) минус высота хедера (72px). */
    height: calc(100vh - 72px);
    /* 2. Разрешаем вертикальную прокрутку, только если контент не умещается. */
    overflow-y: auto;

    @media screen and (max-width: 1050px) {
        margin-left: 293px;
        width: calc(100% - 326px);
    }

    @media screen and (max-width: 991px) {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    @media screen and (max-width: 768px) {
        padding-top: 24px;
        margin-top: 46px; /* Должен быть равен высоте хедера */
        height: calc(100vh - 46px);
    }
}


.container {
    max-width: 1470px;
    min-width: 360px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
}

input, textarea, select {
    border: none;
    width: 100%;
    padding: 16px 12px;
    align-items: center;
    align-self: stretch;
    border-radius: 4px;
    background-color: #F0F3F5;
    font-size: 1rem; /*16px*/

}

input::placeholder, textarea::placeholder {
    color: #829CC0;
}

input:focus, textarea:focus {
    outline: 0.5px solid #C8D6E9;
    background-color: #FFF;
}

textarea {
    resize: none;
}

button {
    cursor: pointer;
    border: none;

    width: 100%;
    padding: 24px 12px;
    justify-content: center;
    align-self: stretch;

    border-radius: 12px;
    background-color: #A716B6;
    color: #FFF;

    font-size: 1rem; /*16px*/
    font-weight: 700;
}

a {
    cursor: pointer;
    color: #062DFD;
    font-size: 0.875rem; /* 14px */
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}


/* Header ----------------------------------------------------------------------------------------------------------- */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    height: 72px;
    padding: 0 24px;

    background-color: #FFF;
    border-bottom-width: 0.5px;
    border-bottom-style: solid;
    border-bottom-color: #E7ECF3;

    z-index: 100;

    @media screen and (max-width: 768px) {
        height: 46px;
    }
}

.langIconBtn {
    cursor: pointer;
}

.dropdownLangs {
    display: flex;
    flex-direction: column;
    right: 0;
    top: 71px;
    z-index: 999;

    position: absolute;
    width: 158px;

    font-size: 0.8125rem;
    line-height: 12.8px;
    letter-spacing: -0.26px;
    background-color: white;

    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none; /* пока невидимый */

    @media screen and (max-width: 768px) {
        top: 45px
    }

    li {
        list-style-type: none;
        padding: 17.5px 13px;
        cursor: pointer;

        position: relative;

    }
    li:before {
        content: '';
        position: absolute;
        border-bottom: 1px solid #E7ECF3;
        width: 143px;
        right: 0;
        bottom: 0;
        transition: 0.2s;
    }
    li:hover:before {
        width: 0;
    }
    li:last-child {
        border: none;
    }
    li:last-child:before {
        border: none;
        width: 0;
    }
    li:hover {
        background-color: #F0F3F5;
    }
}

.activeLang {
    background-color: #F0F3F5;;
}

.customWidthForBeforeLine {
    li:before {
        width: 116px;
    }
}

.dropdownLangs.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdownLangs.hide {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.profileDropdownIconWrapper {
    display: flex;
    gap: 12px;

    align-items: center;
    text-decoration: none;

    font-size: 0.8125rem;
    line-height: 12.8px; /* 98.462% */
    letter-spacing: -0.26px;

    cursor: pointer;
    position: relative;

    &:before {
        content: '';
        position: absolute;
        border-bottom: 1px solid #E7ECF3;
        width: 116px;
        right: 0;
        bottom: 0;
        transition: 0.2s;
    }
    &:last-child:before {
        width: 0;
    }
    li:hover:before {
        width: 0;
    }
}

.profileDropdownIconWrapper:hover {
    background-color: #F0F3F5;

    &:before {
        width: 0;
    }
}

.activeProfileOrSetPass {
    background-color: #F0F3F5;
}

.lockIconAndTextWrapper {
    display: flex;
    align-items: center;
    gap: 4px;

    font-size: 0.875rem;
    cursor: pointer;

    /* убираем возможность копирования */
    -webkit-user-select: none; /* Для старых версий Safari и Chrome */
    -moz-user-select: none;    /* Для Firefox */
    -ms-user-select: none;     /* Для Internet Explorer/Edge */
    user-select: none;         /* Стандартное свойство */
}

/* Snackbar --------------------------------------------------------------------------------------------------------- */

#snackbar, #snackbarForReportUser {
    display: flex;
    align-items: center;
    border-radius: 8px;
    background-color: rgb(253, 209, 229);
    gap: 12px;

    visibility: hidden; /* Hidden by default. Visible on click */
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    padding: 14px 56px 14px 13px; /* Padding */
    position: absolute; /* Sit on top of the screen */
    z-index: 1000; /* Add a z-index if needed */
    left: 10px;
    margin-right: 10px;
    bottom: 10px; /* 30px from the bottom */

    span {
        color: #A62121;

        line-height: 17px; /* 106.25% */
        letter-spacing: -0.48px;
    }
}

#snackbarForReportUser {
    position: relative;
    visibility: visible;
    background-color: #F0F3F5;

    padding: 14px 32px 14px 13px;
    text-align: left;
    z-index: 10;

    span {
        color: #27374D;
    }
}



#snackbar.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 10px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 10px; opacity: 1;}
}


/*Custom checkbox -----------------------------------------------------------------------------------------------------*/

/* 1. Скрываем стандартный инпут */
.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0; /* Делаем его невидимым, но сохраняем доступность */
    width: 0;
    height: 0;
}

/* 2. Стилизуем "коробочку" (наш span) */
.checkbox-icon {
    display: inline-block;
    position: relative;
    top: 2px;
    transition: all 0.2s ease;

    width: 32px; /* Размер "коробочки" */
    height: 32px;
    border: 2px solid #C5D1E2;
    background-color: #F0F3F5;
    border-radius: 4px;
}

/* 3. Стилизуем ГАЛОЧКУ (псевдоэлемент :after) */
.checkbox-icon:after {
    content: "";
    position: absolute;
    /* Устанавливаем размер иконки/галочки с помощью этих параметров */
    width: 5px;
    height: 12px;
    top: 6.5px;
    left: 12px;
    border: solid transparent;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg); /* Поворачиваем, чтобы создать форму галочки */
    opacity: 0; /* Изначально скрыта */
    transition: opacity 0.2s ease;
}

/* 4. СОСТОЯНИЕ: Когда чекбокс АКТИВЕН */
.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-icon {
    background-color: #536884; /* Цвет фона активной "коробочки" */
    border-color: #536884;
}

/* 5. ПОЯВЛЕНИЕ и СТИЛЬ ГАЛОЧКИ */
.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-icon:after {
    opacity: 1; /* Галочка появляется */
    border-color: #fff; /* Цвет самой галочки (ИКОНКИ) - белый */
}


/* Loading ---------------------------------------------------------------------------------------------------------- */

#loading {
    /* Удаляем ненужные стили для линейного лоадера */
    /* position: fixed; */
    /* background-color: black; */
    /* opacity: 0.3; */
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */

    /* Сохраняем позиционирование и z-index */
    position: fixed;
    top: 71px;
    right: 0;
    left: 0;
    z-index: 9999;

    /* Устанавливаем высоту и цвет фона для полосы-контейнера */
    height: 3px; /* Толщина полосы */
    overflow: hidden; /* Важно, чтобы анимированный элемент не выходил за границы */

    @media screen and (max-width: 768px) {
        top: 45px;
    }
}

#loading:before {
    content: '';
    display: block; /* Изменяем на block для полной ширины */
    position: absolute; /* Позиционируем относительно #loading */
    top: 0;
    left: 0;

    /* Устанавливаем размеры и цвет для анимированной части */
    height: 100%; /* Занимает всю высоту родителя (#loading) */
    width: 30%; /* Начальная ширина "заполнения" */
    background-color: #A716B6; /* Яркий цвет для "прогресса" */

    /* Удаляем стили круглого лоадера */
    border: none;
    border-radius: 0;

    /* Применяем новую анимацию */
    animation: linear-move 0.7s cubic-bezier(0.65, 0.81, 0.73, 0.78) infinite;
}

@keyframes linear-move {
    0% {
        left: -30%; /* Начинаем за пределами слева */
        width: 30%;
    }
    50% {
        left: 45%; /* Середина движения */
        width: 30%;
    }
    100% {
        left: 100%; /* Уходим за пределы справа */
        width: 100%; /* Увеличение ширины при выходе может выглядеть лучше */
    }
}



.errorInput {
    outline: 0.5px solid red;
    background-color: #FFF;
}
.errorInput:focus {
    outline: 0.5px solid red;
    background-color: #FFF;
}


/* SKELETON ----------------------------------------------------------------------------------------------------------*/
.skeleton-shimmer {
    /* Базовые размеры */
    width: 100%;
    height: 20px;
    border-radius: 4px;

    /* Анимация мерцания */
    background: linear-gradient(
            90deg,
            #f0f0f0 0%, /* Серый */
            #e0e0e0 50%, /* Блик */
            #f0f0f0 100% /* Серый */
    );
    background-size: 200% 100%; /* Делаем градиент шире контейнера */

    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0; /* Начинаем за пределами слева */
    }
    100% {
        background-position: 200% 0; /* Заканчиваем за пределами справа */
    }
}
