/* KMSDEV Chat — лёгкий фирменный слой поверх Element Web.
   Школа «Статика» kmsdev.ru, светлая: белые поверхности, тонкие бордеры,
   акцент oklch(55% .19 248) = #0073d9. Подключается nginx sub_filter'ом. */

/* Страницы входа */
.mx_AuthPage {
    background: #f9fafd;
}
.mx_AuthPage_modal {
    background: #ffffff;
    border: 1px solid #dcdee2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(31, 34, 40, .05), 0 12px 32px rgba(31, 34, 40, .07);
}
.mx_AuthHeader {
    background: #ffffff;
    border-right: 1px solid #eef0f3;
    border-radius: 12px 0 0 12px;
    position: relative;
}
/* Куб — точно в центре панели по высоте, язык остаётся внизу */
.mx_AuthHeaderLogo {
    position: absolute !important;
    top: 50% !important;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    margin: 0 !important;
    display: flex !important;
    justify-content: center;
    text-align: center;
}
.mx_AuthHeaderLogo img {
    width: 74px;
    height: auto;
}
/* Языковой селектор: аккуратный, список со скроллом — не уезжает за экран */
.mx_AuthBody_language {
    margin-top: 16px;
}
.mx_AuthBody_language .mx_Dropdown_menu {
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dcdee2;
    border-radius: 8px;
}
.mx_AuthBody {
    background: #ffffff;
    color: #1f2228;
    border-radius: 0 12px 12px 0;
}
.mx_AuthBody h1 { color: #1f2228; letter-spacing: -.02em; }
.mx_AuthBody h2 { color: #656970; font-weight: 500; }
.mx_AuthBody a,
.mx_AuthBody a:link,
.mx_AuthBody a:visited { color: #0073d9; }

/* Кнопки — фирменный акцент */
.mx_AuthBody .mx_Login_submit,
.mx_AuthBody .mx_AccessibleButton_kind_primary {
    background: #0073d9;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    transition: background .18s cubic-bezier(.2, .8, .2, 1);
}
.mx_AuthBody .mx_Login_submit:hover,
.mx_AuthBody .mx_AccessibleButton_kind_primary:hover {
    background: #0063c8;
}

/* Чужой футер (Blog / Mastodon / GitHub / Powered by Matrix) */
.mx_AuthFooter { display: none; }

/* Мобильный лейаут: карточка на весь экран, шапка-строка с кубом,
   форма на всю ширину */
@media (max-width: 600px) {
    .mx_AuthPage { padding: 0; }
    .mx_AuthPage_modal {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        border: 0;
        border-radius: 0;
        min-height: 100dvh;
        box-shadow: none;
    }
    .mx_AuthPage_modalContent {
        flex-direction: column !important;
        width: 100% !important;
    }
    .mx_AuthHeader {
        width: 100% !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-right: 0;
        border-bottom: 1px solid #eef0f3;
        border-radius: 0;
        padding: 10px 18px;
        box-sizing: border-box;
    }
    .mx_AuthHeaderLogo {
        position: static !important;
        transform: none;
        display: flex !important;
        margin: 0 !important;
    }
    .mx_AuthHeaderLogo img { width: 64px; height: 64px; }
    .mx_AuthBody_language { margin-top: 0; }
    .mx_AuthBody {
        width: 100% !important;
        max-width: none !important;
        border-radius: 0;
        box-sizing: border-box;
    }
}
