/*
    ПРОЕКТ "КОРОБОК"
    ПАНЕЛЬ ЛОГИНА View\Main\MainLogin.html

    Последняя версия: 15.01.2024

    UPD: поправлены стили окна входа для разных разрешений, поле ввода пароля администратора с кнопкой

*/

@import "consts.css";
@import "fonts.css";


/*
    Общие модификаторы
*/

.visible-mobile {
    display: none;
}

.not-visible {
    visibility: hidden;
}

.hidden-mobile {
    display: inline-block;
}

.container {
    display: block;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    margin-top: 0;
    padding: 0;
}

main {
    display: flex;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

#notify-span {
    margin-bottom: 0;
}

/*
    Панель
*/
.panel {
    flex-grow: 1;
    max-width: 548px;
    padding: 47px 50px 53px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    background-color: var(--white-background)
}

.panel__logo {
    margin-bottom: 25px;

    text-align: center;
}

.panel__logo-image {
    width: 180px;
    height: 46px;
}

.panel__title {
    margin-bottom: 5px;
}

.panel__menu {
    margin-bottom: 15px;
    padding-left: 0;

    line-height: 26px;
    text-align: left;
}

.menu-main__item {
    margin-right: 30px;

    font-size: 14px;
}

.form__label {
    margin-bottom: 12px;
}

.form__text {
    height: 60px;
    margin-bottom: 25px;
}

.form__password {
    margin-bottom: 25px;
}

.form__password-text {
    height: 60px;
    margin-bottom: 0;
}

.panel__remember-forgot {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 25px;
}

.panel__remember {
    display: flex;

    color: var(--text__remember_me);
}

.panel__forgot {
    color: var(--text__second);
    text-align: center;
}

.panel__forgot-link:hover {
    color: var(--purple__purple_500);

    text-decoration: none;

    cursor: pointer;
}

.panel__button {
    width: 100%;
    padding: 14px 40px;

    line-height: 22px;
}

.form__content_qr {
    line-height: 1;
}

.form__qr {
    width: 216px;
    height: 216px;
}

.panel__forgot-link {
    color: var(--text__second);

    text-decoration: none;

    line-height: 20px;
}

/* Modern login container styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 300px;
}

.login-box .panel__logo {
    margin-bottom: 1.5rem;
}

.login-box .panel__logo-image {
    max-width: 150px;
    height: auto;
}

.login-box h1 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.login-box .form__content_qr {
    margin: 2rem 0;
}

.login-box .form__qr {
    max-width: 200px;
    height: auto;
}

.login-box .qr-instructions {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.login-box .form__password {
    position: relative;
    margin-bottom: 1.5rem;
}

.login-box .form__password-text {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    height: auto;
}

.login-box .form__password-text:focus {
    border-color: var(--purple__purple_500);
}

.login-box .form__password-visibility {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>') no-repeat center;
    cursor: pointer;
    opacity: 0.6;
}

.login-box .form__password-visibility:hover {
    opacity: 1;
}

.login-box .button {
    background: var(--purple__purple_500);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.login-box .button:hover {
    background: var(--purple__purple_600);
}

.login-box .button:active {
    background: var(--purple__purple_600);
}

.login-box .form {
    width: 100%;
}

@media screen and (max-width: 1210px) {
    .panel__menu {
        display: block;
    }
}

@media screen and (max-width: 1024px) {
    .panel {
        max-width: 718px;
        padding: 27px 40px;
    }

    .panel__logo {
        margin-bottom: 25px;
    }

    .panel__title {
        margin-bottom: 9px;
    }

    .menu-main__item {
        font-size: 16px;
    }

    .form__label {
        margin-bottom: 10px;
    }

    .panel__remember {
        font-size: 16px;
    }

    .panel__forgot {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .panel {
        max-width: calc(100% - 40px);
        padding: 27px 50px;
    }

    .panel__logo {
        margin-bottom: 18px;
    }
}

@media screen and (max-width: 578px) {
    .panel {
        max-width: calc(100% - 40px);
        padding: 27px 50px;
    }

    .panel__logo {
        margin-bottom: 18px;
    }
}

@media screen and (max-width: 546px) {
    .panel {
        padding: 19px 26px 26px;
    }
}

@media screen and (max-width: 480px) {
    .hidden-mobile {
        display: none;
    }

    .visible-mobile {
        display: inline-block;
    }

    .panel__logo {
        margin-bottom: 16px;

        text-align: left;
    }

    .panel__logo-image {
        width: 136px;
        height: 32px;
    }

    .panel__title {
        margin-bottom: 16px;

        font-size: 20px;
    }

    .panel__menu {
        margin-bottom: 16px;
    }

    .menu-main__item {
        margin-right: 64px;

        font-size: 14px;
        font-weight: 400;

        line-height: 26px;
    }

    .form__qr {
        width: 188px;
        height: 188px;
    }

    .form__content {
        margin-bottom: 16px;
    }

    .panel__remember-forgot {
        margin-bottom: 16px;
    }

    .panel__remember {
        font-size: 13px;
        font-weight: 400;
    }

    .panel__forgot {
        font-size: 13px;
        font-weight: 400;
    }

    .panel__button {
        width: 82px;
        padding: 6px 12px;

        font-weight: 600;
    }
}

@media screen and (max-width: 360px) {
    .panel {
        padding: 19px 19px 26px;
    }

    .panel__menu {
        margin-bottom: 16px;
    }

    .menu-main__item {
        /*
        calc (минимальный отступ + (максимальный отступ - минимальный отступ)/(максимальная ширина - минимальная ширина) * (100vw - минимальная ширина)
        */
        margin-right: calc(30px + 0.49*(100vw - 290px));
    }
}