.form-yandex-id {
    margin-bottom: 1.5rem;
}

#ya_id_signin {
    width: 100%;
    min-height: 40px;
}

#ya_id_link {
    width: 100%;
    min-width: 280px;
    min-height: 40px;
}

.yandex-id-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.yandex-id-or .line {
    flex: 1;
    height: 1px;
    background: #ddd;
}

.yandex-id-or .or {
    color: #888;
    font-size: 0.875rem;
    text-transform: lowercase;
}

.form-yandex-id #ya_id_signin button.yandex {
    width: 100%;
    height: 40px;
    min-height: 40px;
    border: 1px solid #111;
    border-radius: 0;
    background: #111;
    color: #fff;
    cursor: pointer;
}

.form-yandex-id #ya_id_signin button.yandex:hover,
.form-yandex-id #ya_id_signin button.yandex:focus {
    background: #333;
    border-color: #333;
    color: #fff;
}

.linked-account-action #ya_id_link button.yandex {
    width: 100%;
    height: 40px;
    min-height: 40px;
    border: 1px solid #cfd4e1;
    border-radius: 0;
    background: #fff;
    color: #2f3a4a;
    cursor: pointer;
}

.linked-account-action #ya_id_link button.yandex:hover,
.linked-account-action #ya_id_link button.yandex:focus {
    background: rgb(241, 241, 252);
    border-color: rgb(75, 72, 214);
    color: #2f3a4a;
}

.form-yandex-id #ya_id_signin button.yandex svg,
.linked-account-action #ya_id_link button.yandex svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    transform: translateY(-50%);
}

.form-yandex-id #ya_id_signin button.yandex span,
.linked-account-action #ya_id_link button.yandex span {
    display: block;
    width: 100%;
    text-align: center;
}

.linked-account-icon-yandex {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.linked-account-icon-yandex svg {
    width: 24px;
    height: 24px;
    display: block;
    border-radius: 50%;
    overflow: hidden;
}

.yandex-link-notice {
    margin-bottom: 0.9rem;
}

.linked-accounts {
    margin-top: 1.5rem;
}

.linked-account-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #d8deeb;
    border-radius: 0.35rem;
    background: #fff;
}

.linked-account-info {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.linked-status {
    font-size: 0.92rem;
    line-height: 1.3;
}

.linked-status.linked {
    color: #1f7a3b;
}

.linked-status.not-linked {
    color: #6b7280;
}

.linked-email {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.linked-account-action {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.linked-account-action #ya_id_link,
.linked-account-action #ya_id_link > div {
    width: 100%;
}

.linked-account-action form {
    margin: 0;
}

@media (max-width: 640px) {
    .linked-account-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .linked-account-action {
        width: 100%;
        justify-content: stretch;
    }

    .linked-account-action .btn,
    .linked-account-action form,
    .linked-account-action #ya_id_link {
        width: 100%;
    }
}
