@import url('https://fonts.googleapis.com/css2?family=Onest:wght@100..900&display=swap');

* {
    font-family: 'Onest', Arial, sans-serif;
    box-sizing: border-box;
    color: #333333;
    caret-color: transparent;
}

body {
    margin: 0px 0px 0px 0px;
    background: #f6f7f8;
}

.login-content {
    background-color: #f6f7f8;

    min-height: 100vh;

    display: flex;
    justify-content: center; /* по горизонтали */
    align-items: center;     /* по вертикали */
}

.login-column {
    position: relative;
    width: 100%;
    max-width: 25rem;
    margin-top: 0;
    padding: 0;
}

.login-block {
    width: 100%;
    padding: 2rem;
    padding-bottom: 0.75rem;

    background-color: white;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-radius: 16px;

    display: flex;
    flex-direction: column;
    align-items: center; /* все элементы по центру */
    gap: 0;
    max-width: 100%;
}

.login-block form {
    width: 90%;
}

.logo {
    display: flex;
    justify-content: center; /* по горизонтали */
}

.logo .logo-icon {
    height: 2rem;
    object-fit: contain; /* Чтобы сохранялись пропорции при сжатии */
    margin-bottom: 2rem;
}

.input-group input {
    caret-color: auto;
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 12px;
    color: #333;
    margin-bottom: 0.5rem;
}

.input-group input:focus,
.input-group input:focus-visible {
  outline: none;
  box-shadow: none;
}

.input-group input::placeholder {
    color: #999;
}

.login-button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;

    transition:
        background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow       0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-button:focus,
.login-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.login-button:hover {
    background-color: #2563eb;
}

.login-links {
    width: 90%;
    margin-top: 1.5rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.login-link {
    font-size: 0.9rem;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
}

.login-link:hover {
    text-decoration: underline;
}

.social-login-label {
    margin-top: 1.75rem;
    margin-bottom: 1rem;

    font-size: 0.9rem;
    line-height: 1.4;
    color: #8a8a8a;
    text-align: center;
}

.success {
    color: green;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.error {
    color: red;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.social-button--circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #ffffff;      /* было #cfcfcf */
    border: 1px solid #dcdcdc;      /* аккуратная рамка */
    cursor: pointer;

    position: relative;
    transition:
            background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow       0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-button--circle:hover {
    background-color: #3b82f6;
    border-color: transparent;
}

/* обе иконки накладываются друг на друга */
.social-icon {
    width: 18px;
    height: 18px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
}
/* по умолчанию */
.social-icon--color {
    opacity: 1;
}

.social-icon--white {
    opacity: 0;
}

/* при hover — меняем */
.social-button--circle:hover .social-icon--color {
    opacity: 0;
}

.social-button--circle:hover .social-icon--white {
    opacity: 1;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    margin-bottom: 1.5rem;
}

.social-icon--yandex .yandex-letter {
    fill: #FC3F1D;
}

.social-button--circle:hover .social-icon--yandex .yandex-letter {
    fill: #ffffff;
}

.social-icon--yandex {
    width: 36px;
    height: 36px;
}

.login-legal {
    width: 100%;
}

.login-legal hr {
    width: 90%;
    border: none;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 0.75rem;
    margin-top: 0px;
}

.login-legal p {
    margin: 0;
    font-size: 0.75rem;
    color: #9aa0a6;
    text-align: center;
    line-height: 1.4;
}

.login-legal a {
    color: #6b7280;
    text-decoration: none;
}

.login-legal a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE PASS ===== */
@media (max-width: 600px) {
    .login-column {
        max-width: 100%;
        margin-top: 0;
    }

    .login-page-title {
        position: static;
        width: 100%;
        margin: 0 auto 1.45rem;
        transform: none;
    }

    .login-content {
        min-height: 100svh;
        align-items: center;
        padding: 6.5rem 1.25rem 2rem;
    }

    .login-block {
        max-width: 100%;
        padding: 1.5rem 1.25rem 0.9rem;
    }

    .login-block form,
    .login-links {
        width: 100%;
    }

    .login-link {
        white-space: normal;
    }

    .login-legal p {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    .login-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .login-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.65rem;
    }
}


body.dark-theme .login-page-title {
    color: #f3f4f6;
}
