/* Опции: запомнить и забыли пароль */
.fx-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    flex-wrap: wrap;
    gap: 0.5em;
}

/* Запомнить */
.fx-remember {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

/* Ссылка */
.fx-forgot a.fx-link {
    font-size: 0.9em;
    color: #0066cc;
    text-decoration: none;
}

.fx-forgot a.fx-link:hover {
    text-decoration: underline;
}

/* Горизонтальная линия */
.fx-separator {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}

.login-block {
    max-width: 340px;
    margin: 0 auto;
}

.login-block .fx-row-left {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-block .fx-input-wrapper {
    width: 100%;
    max-width: 300px; /* чтобы поля были одинаковой длины */
    position: relative;
}

/* Кнопка "показать пароль" */
.login-block .fx-password-wrapper {
    position: relative;
}

.login-block .fx-toggle-password {
    position: absolute;
    top: 50%;
    right: 0.6em;
    transform: translateY(-50%);
    border: none;
    width: 1.5em;
    height: 1.5em;
    cursor: pointer;
    opacity: 0.6;
}

.login-block .fx-toggle-password:hover {
    opacity: 1;
}

.fx-login-row,
.fx-password-row {
    margin-bottom: 0.1em;
}

.separator-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: #666;
    margin: 20px 0;
    font-weight: 600;
    font-size: 1rem;
    flex: 0 0 40px;
    flex-direction: column;
    justify-content: center;
    position: relative;
    margin: 0 30px 0 15px;
    min-height: 100%;
}

/* Линии до и после текста */
.separator-with-text::before,
.separator-with-text::after {
    content: "";
    flex: 1;
    width: 1px;
    background-color: #ccc;
    margin: 0 1em;
}

/* Текст вертикально (сверху вниз) */
.separator-with-text span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 10px 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    text-align: center;
}

#uLoginBig {
    width: 100%;
    margin: 0;
}

/* Скрываем ненужные кнопки */
.ulogin-button-odnoklassniki,
.ulogin-button-mailru,
.ulogin-button-vkontakte,
.VkIdSdk_oauth_link_text,
.vkc__SDKOAuthList__caption span {
    display: none !important;
}

/* Контейнер — вертикальный флекс */
#uLoginBig .ulogin-buttons-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important; /* Или просто убери строку */
    height: auto !important;
    float: none !important;
}

/* Универсальные стили для кнопок */
#uLoginBig .ulogin-button-google,
#uLoginBig .ulogin-button-livejournal {
    position: relative !important;
    display: flex;
    align-items: center !important;
    width: 100% !important;
    height: 44px !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 16px 0 52px !important; /* отступ под иконку */
    box-sizing: border-box !important;
    margin-bottom: 14px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #fff !important;
    font-family: sans-serif !important;
    background-color: #eee !important; /* базовый, переопределим ниже */
    text-align: left !important;
    cursor: pointer !important;
    overflow: hidden !important;
    background: none !important;
}

/* Круглый логотип как отдельный элемент */
#uLoginBig .ulogin-button-google::before,
#uLoginBig .ulogin-button-livejournal::before {
    content: '' !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    background-color: #fff !important;
    border-radius: 30% !important;
    background-repeat: no-repeat !important;
    background-size: 32px auto !important;
}

/* Иконка Google */
#uLoginBig .ulogin-button-google {
    background-color: #4285f4 !important;
}

#uLoginBig .ulogin-button-google::before {
    background-image: url("https://ulogin.ru/version/3.0/img/providers-64-flat.png?version=img.3.0.1") !important;
    background-position: 0px -206px !important;
}

/* Иконка LiveJournal */
#uLoginBig .ulogin-button-livejournal {
    background-color: #00acee !important;
}

#uLoginBig .ulogin-button-livejournal::before {
    background-image: url("https://ulogin.ru/version/3.0/img/providers-64-flat.png?version=img.3.0.1") !important;
    background-position: 0px -274px !important;
}

#uLoginBig .ulogin-button-google::after,
#uLoginBig .ulogin-button-livejournal::after {
    position: absolute !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1 !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #fff !important;
    pointer-events: none !important;
}

#uLoginBig .ulogin-button-livejournal::after {
    content: "Войти через ЖЖ" !important;
}

#uLoginBig .ulogin-button-google::after {
    content: "Войти через Google" !important;
}

#ya-login-button {
    display: inline-flex;
    align-items: center;
    background-color: #000;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    margin-bottom: 14px;
    width: 100%;
    height: 48px;
    min-width: auto; /* убрал ограничение */
    padding: 11px 13px;
    font-size: 14px;
    line-height: 16px;
    box-sizing: border-box;
    max-width: 100%;
}

#ya-login-button iframe {
    max-width: 100%;
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}


#ya-login-button:hover {
    background-color: #000;
}

#ya-login-button .ya-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 0.6em;
    background-color: #fc3f1d;
    margin-left: 20px;
}

#ya-login-button .ya-label {
    color: #fff !important;
    margin-left: 45px;
}


.fx-login-columns {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    max-width: 700px; /* Центрируем и ограничиваем ширину */
    margin: 0 auto;
    position: relative;
}

.fx-reg-columns {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* Левая и правая колонки одинаковой ширины */
.login-form-wrapper,
.social-block {
    flex: 0 0 320px;
    max-width: 320px;
}

/* ---------- МОБИЛЬНАЯ ВЕРСИЯ ---------- */
@media (max-width: 768px) {
    .fx-login-columns {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
    }

    .login-form-wrapper {
        max-width: 320px;   /* ограничиваем ширину */
        margin-left: auto;
        margin-right: auto; /* центрируем блок */
    }

    .login-form-wrapper,
    .social-block {
        max-width: none;
        width: 90%;
        flex: 1 1 auto;
    }

    .separator-with-text {
        flex-direction: row;
        width: 100%;
        height: auto;
        margin: 0 0 20px 0;
        min-height: unset;
    }

    .separator-with-text::before,
    .separator-with-text::after {
        width: auto;
        height: 1px;
        margin: 0 10px;
    }

    .separator-with-text span {
        writing-mode: horizontal-tb;
        transform: none;
        margin: 0 10px;
        font-size: 14px;
    }
}

/* Основная форма */
.reg-form-wrapper {
    flex: 1;
    min-width: 300px;
}

/* Только для разделителя в форме регистрации */
.fx-reg-columns .separator-with-text {
    flex-direction: column;
    justify-content: flex-start; /* сдвигаем текст к верху */
    flex: 0 0 150px; /* высота блока с разделителем, можно подкорректировать */
}

.fx-reg-columns .separator-with-text::before {
    flex-grow: 1;   /* верхняя линия — 10% */
    height: 15px;   /* регулирует длину линии сверху */
}

.fx-reg-columns .separator-with-text::after {
    flex-grow: 9;   /* нижняя линия — 90% */
    height: 135px;  /* регулирует длину линии снизу */
}

.fx-reg-columns .separator-with-text span {
    margin: 10px 0 0 0; /* сдвигаем текст вниз от верхней линии */
}

@media (max-width: 768px) {
    /* Для формы регистрации: делаем колонки вертикальными */
    .fx-reg-columns {
        flex-direction: column;
        gap: 0.6rem; /* можно регулировать отступы */
        max-width: none;
        align-items: stretch;
    }

    /* Регулируем ширину вложенных блоков */
    .reg-form-wrapper,
    .fx-reg-columns .ulogin-container {
        width: 100%;
        max-width: none;
    }

    /* Разделитель — меняем на горизонтальный вид */
    .fx-reg-columns .separator-with-text {
        flex-direction: row !important;
        justify-content: center !important;
        flex: none !important;
        height: auto !important;
        margin: 1rem 0 !important;
        min-height: unset !important;
        text-align: center !important;
    }

    /* Линии вокруг текста — горизонтальные */
    .fx-reg-columns .separator-with-text::before,
    .fx-reg-columns .separator-with-text::after {
        width: auto !important;
        height: 1px !important;
        margin: 0 10px !important;
        flex-grow: 1 !important;
        background-color: #ccc !important;
    }

    /* Текст — горизонтальный */
    .fx-reg-columns .separator-with-text span {
        writing-mode: horizontal-tb !important;
        transform: none !important;
        margin: 0 10px !important;
        font-size: 14px !important;
        color: #666 !important;
        white-space: normal !important;
    }
}

.vk-login-button {
    width: 102%;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); /* чуть темнее фон */
    backdrop-filter: blur(5px); /* увеличил размытие */
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
    opacity: 0;
}
/* Когда показываем модалку */
.modal-overlay.show {
    display: flex;
    opacity: 1;
}
.modal-login {
    background: #fff;
    border-radius: 10px;
    max-width: 500px;
    width: 98%;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.4);
    position: relative;
}
.modal-login .close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 22px;
    cursor: pointer;
    color: #666;
}

@media (max-width: 768px) {

    .modal-login {
        padding: 5px 20px 10px 20px;
        max-height: 600px;
        width: 95%;
        max-width: 400px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 2px 15px rgba(0,0,0,0.4);
        position: relative;
        top:20px;
        z-index: 199999999;
    }
}





